From 8c114fe9a5c6108cccc83b7acfbfdd62493b556c Mon Sep 17 00:00:00 2001 From: xSmurf Date: Wed, 30 Sep 2015 19:01:29 +0000 Subject: [PATCH] ... --- .../etc/init.d/S00hostname-spoof | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/board/coreboot/rootfs-additions/etc/init.d/S00hostname-spoof b/board/coreboot/rootfs-additions/etc/init.d/S00hostname-spoof index 51763eb..4361a60 100755 --- a/board/coreboot/rootfs-additions/etc/init.d/S00hostname-spoof +++ b/board/coreboot/rootfs-additions/etc/init.d/S00hostname-spoof @@ -20,14 +20,15 @@ do_start() { # Make sure that our selected hostname doesn't appear anywhere in /etc, # this way it should be safe to sed the whole directory # we aren't doing this, but it could be useful in the future. - NOTFOUND=0 - until [ "${NOTFOUND}" -gt "0" ]; do - #WORD=$(/usr/bin/shuf -n1 "$FILE") - WORD=$(/usr/bin/openssl rand -hex 8) - - /bin/fgrep -r $WORD /etc/ 2>&1 >> /dev/null - NOTFOUND=$? - done +# NOTFOUND=0 +# until [ "${NOTFOUND}" -gt "0" ]; do +# #WORD=$(/usr/bin/shuf -n1 "$FILE") +# WORD=$(/usr/bin/openssl rand -hex 8) +# +# /bin/fgrep -r $WORD /etc/ 2>&1 >> /dev/null +# NOTFOUND=$? +# done + WORD=$(/usr/bin/openssl rand -hex 8) echo "Setting hostname to '$HOSTNAME'" @@ -38,7 +39,7 @@ do_start() { echo "$WORD" > /etc/hostname echo "$OLDHOST" > /etc/hostname.old - sed -i "s/${OLDHOST}/${WORD}/g" /etc/hosts + #/bin/sed -i "s/${OLDHOST}/${WORD}/g" /etc/hosts exit $ES }