forked from ungleich-public/cdist
[__hostname] Add support for Slackware
This commit is contained in:
parent
66c85230a0
commit
5eb9fec550
2 changed files with 8 additions and 2 deletions
|
@ -66,7 +66,7 @@ in
|
|||
"&& hostnamectl set-hostname '$name_should'" \
|
||||
"|| hostname '$name_should'"
|
||||
;;
|
||||
centos|fedora|redhat|scientific|freebsd|netbsd|gentoo|void)
|
||||
centos|fedora|redhat|scientific|freebsd|netbsd|gentoo|slackware|void)
|
||||
echo "hostname '$name_should'"
|
||||
;;
|
||||
macosx)
|
||||
|
|
|
@ -41,7 +41,7 @@ else
|
|||
case $os
|
||||
in
|
||||
# RedHat-derivatives and BSDs
|
||||
centos|fedora|redhat|scientific|freebsd|netbsd|openbsd)
|
||||
centos|fedora|redhat|scientific|freebsd|netbsd|openbsd|slackware)
|
||||
# Hostname is FQDN
|
||||
name_should="${__target_host}"
|
||||
;;
|
||||
|
@ -130,6 +130,12 @@ in
|
|||
openbsd)
|
||||
echo "$name_should" | __file /etc/myname --source -
|
||||
;;
|
||||
slackware)
|
||||
# We write the FQDN into /etc/HOSTNAME.
|
||||
# But /etc/rc.d/rc.M will only read the first component from this file
|
||||
# and set it as the running hostname on boot.
|
||||
echo "$name_should" | __file /etc/HOSTNAME --source -
|
||||
;;
|
||||
suse)
|
||||
# We write into /etc/HOSTNAME for backwards-compatibility. Modern SuSE
|
||||
# has hostnamectl anyway and symlinks /etc/HOSTNAME to /etc/hostname.
|
||||
|
|
Loading…
Reference in a new issue