diff options
Diffstat (limited to 'nonprism')
-rw-r--r-- | nonprism/hostname-blanker/hostname-blanker.service | 2 | ||||
-rw-r--r-- | nonprism/hostname-blanker/hostname-blanker.sh | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/nonprism/hostname-blanker/hostname-blanker.service b/nonprism/hostname-blanker/hostname-blanker.service index 3e5362b3a..8a4bd922f 100644 --- a/nonprism/hostname-blanker/hostname-blanker.service +++ b/nonprism/hostname-blanker/hostname-blanker.service @@ -4,7 +4,7 @@ Before=network-pre.target [Service] Type=oneshot -ExecStart=/bin/bash /opt/hostname-blanker +ExecStart=/bin/bash /opt/hostname-blanker.sh RemainAfterExit=false [Install] diff --git a/nonprism/hostname-blanker/hostname-blanker.sh b/nonprism/hostname-blanker/hostname-blanker.sh index ecdcfd4b4..c19d60eb3 100644 --- a/nonprism/hostname-blanker/hostname-blanker.sh +++ b/nonprism/hostname-blanker/hostname-blanker.sh @@ -1,6 +1,7 @@ #!/bin/sh # This script wipes hostname so that DHCP can't send it over the network #hostnamectl set-hostname localhost +sed -i '/dhcp=/c\dhcp=dhclient' /etc/NetworkManager/NetworkManager.conf echo "localhost" > /etc/hostname wait sed -i '/127.0.0.1/c\127.0.0.1 localhost.localdomain localhost 'localhost'' /etc/hosts ##properly sets our new host in /etc/hosts file |