mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-13 10:30:16 +00:00
config: Drop ability to set hostname on systems without systemd
We depend on systemd for many things anyway and this code path is never tested. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
5a1f4b6647
commit
2bd0ef7c61
@ -3,15 +3,6 @@
|
|||||||
|
|
||||||
hostname="$1"
|
hostname="$1"
|
||||||
|
|
||||||
if [ -d /run/systemd/system ] ; then
|
hostnamectl set-hostname --transient --static "$hostname"
|
||||||
hostnamectl set-hostname --transient --static "$hostname"
|
|
||||||
else
|
|
||||||
echo "$hostname" > /etc/hostname
|
|
||||||
if [ -x /etc/init.d/hostname.sh ] ; then
|
|
||||||
invoke-rc.d hostname.sh start
|
|
||||||
else
|
|
||||||
service hostname start
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
service avahi-daemon restart
|
service avahi-daemon restart
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user