mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +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"
|
||||
|
||||
if [ -d /run/systemd/system ] ; then
|
||||
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
|
||||
hostnamectl set-hostname --transient --static "$hostname"
|
||||
|
||||
service avahi-daemon restart
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user