[__hostname] Patch for modern ArchLinux without hostname(1)
This commit is contained in:
parent
f276813f7f
commit
cbae534af5
1 changed files with 6 additions and 1 deletions
|
@ -61,7 +61,12 @@ in
|
||||||
alpine|debian|devuan|ubuntu)
|
alpine|debian|devuan|ubuntu)
|
||||||
echo 'hostname -F /etc/hostname'
|
echo 'hostname -F /etc/hostname'
|
||||||
;;
|
;;
|
||||||
archlinux|centos|fedora|redhat|scientific|freebsd|netbsd|gentoo)
|
archlinux)
|
||||||
|
echo 'command -v hostnamectl >/dev/null 2>&1' \
|
||||||
|
"&& hostnamectl set-hostname '$name_should'" \
|
||||||
|
"|| hostname '$name_should'"
|
||||||
|
;;
|
||||||
|
centos|fedora|redhat|scientific|freebsd|netbsd|gentoo)
|
||||||
echo "hostname '$name_should'"
|
echo "hostname '$name_should'"
|
||||||
;;
|
;;
|
||||||
macosx)
|
macosx)
|
||||||
|
|
Loading…
Reference in a new issue