Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ask hostname in kickstart per
exec < /dev/tty6 > /dev/tty6 2> /dev/tty6
chvt 6
#!/bin/sh
echo
CONFIRM=no
while [ "$CONFIRM" != "y" ]
do
echo -n "Hostname: "
read HOSTNAME
if [ "$HOSTNAME" == "" ]
then
HOSTLINE="network --bootproto=dhcp"
echo -n "Hostname empty?: "
read CONFIRM
else
HOSTLINE="network --bootproto=dhcp --hostname=$HOSTNAME"
echo -n "Sure?: "
read CONFIRM
fi
done
echo $HOSTLINE > /tmp/network.ks
hostname $HOSTNAME
chvt 1
exec < /dev/tty1 > /dev/tty1 2> /dev/tty1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.