mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
Apply patch from Sunil to correctly set hostname in systemd environment.
This commit is contained in:
parent
b98a9ad84d
commit
219b7ff862
@ -18,12 +18,15 @@
|
||||
|
||||
hostname="$1"
|
||||
|
||||
echo "$hostname" > /etc/hostname
|
||||
if [ -x /etc/init.d/hostname.sh ] ; then
|
||||
invoke-rc.d hostname.sh start
|
||||
if [ -d /run/systemd/system ] ; then
|
||||
hostnamectl set-hostname --transient --static "$hostname"
|
||||
else
|
||||
service hostname start
|
||||
echo "$hostname" > /etc/hostname
|
||||
if [ -x /etc/init.d/hostname.sh ] ; then
|
||||
invoke-rc.d hostname.sh start
|
||||
else
|
||||
service hostname start
|
||||
fi
|
||||
fi
|
||||
hostname "$hostname"
|
||||
|
||||
service avahi-daemon restart
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user