From f11691c637f27c032f2136abada397fc11253946 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sat, 7 Jan 2017 17:15:56 -0500 Subject: add hostname-blanker --- nonprism/hostname-blanker/hostname-blanker.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 nonprism/hostname-blanker/hostname-blanker.sh (limited to 'nonprism/hostname-blanker/hostname-blanker.sh') diff --git a/nonprism/hostname-blanker/hostname-blanker.sh b/nonprism/hostname-blanker/hostname-blanker.sh new file mode 100644 index 000000000..ecdcfd4b4 --- /dev/null +++ b/nonprism/hostname-blanker/hostname-blanker.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# This script wipes hostname so that DHCP can't send it over the network +#hostnamectl set-hostname localhost +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 +wait +sysctl kernel.hostname=localhost +wait +hostname localhost ##avoids need to reboot before showing our new hostname in terminals etc. +wait -- cgit v1.2.3