Custom hostname action

This commit is contained in:
Steev Klimaszewski
2018-06-28 19:51:42 -05:00
parent 39bd84a783
commit f2f2e07fda
33 changed files with 262 additions and 76 deletions

10
bbb.sh
View File

@@ -12,6 +12,12 @@ fi
basedir=`pwd`/beaglebone-black-$1
hostname=kali
if [ $2 ]; then
hostname=$2
fi
# Generate a random machine name to be used.
machine=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1)
@@ -65,9 +71,9 @@ deb http://$mirror/kali kali-last-snapshot main contrib non-free
EOF
fi
echo "kali" > kali-$architecture/etc/hostname
echo "$hostname" > kali-$architecture/etc/hostname
cat << EOF > kali-$architecture/etc/hosts
127.0.0.1 kali localhost
127.0.0.1 $hostname localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix