[__hostname] Add support for Solaris

This commit is contained in:
Dennis Camera 2019-11-16 14:57:27 +01:00
parent fbe9fc4204
commit 88947d45b3
2 changed files with 6 additions and 0 deletions

View file

@ -72,6 +72,9 @@ in
macosx) macosx)
echo "scutil --set HostName '$name_should'" echo "scutil --set HostName '$name_should'"
;; ;;
solaris)
echo "uname -S '$name_should'"
;;
suse) suse)
echo 'hostname -F /etc/HOSTNAME' echo 'hostname -F /etc/HOSTNAME'
;; ;;

View file

@ -136,6 +136,9 @@ in
# and set it as the running hostname on boot. # and set it as the running hostname on boot.
echo "$name_should" | __file /etc/HOSTNAME --source - echo "$name_should" | __file /etc/HOSTNAME --source -
;; ;;
solaris)
echo "$name_should" | __file /etc/nodename --source -
;;
suse) suse)
# We write into /etc/HOSTNAME for backwards-compatibility. Modern SuSE # We write into /etc/HOSTNAME for backwards-compatibility. Modern SuSE
# has hostnamectl anyway and symlinks /etc/HOSTNAME to /etc/hostname. # has hostnamectl anyway and symlinks /etc/HOSTNAME to /etc/hostname.