mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +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"
|
hostname="$1"
|
||||||
|
|
||||||
|
if [ -d /run/systemd/system ] ; then
|
||||||
|
hostnamectl set-hostname --transient --static "$hostname"
|
||||||
|
else
|
||||||
echo "$hostname" > /etc/hostname
|
echo "$hostname" > /etc/hostname
|
||||||
if [ -x /etc/init.d/hostname.sh ] ; then
|
if [ -x /etc/init.d/hostname.sh ] ; then
|
||||||
invoke-rc.d hostname.sh start
|
invoke-rc.d hostname.sh start
|
||||||
else
|
else
|
||||||
service hostname start
|
service hostname start
|
||||||
fi
|
fi
|
||||||
hostname "$hostname"
|
fi
|
||||||
|
|
||||||
service avahi-daemon restart
|
service avahi-daemon restart
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user