Hi Everyone,
I am trying to configure manual network in the middle of the installion with kickstart.
so I found script to do it-
%include /mnt/sysimage/root/ks-pre.ks
%pre
exec < /dev/tty6 > /dev/tty6
chvt 6
clear
NETWORK_INTERFACES=$(ls /sys/class/net)
for NET in $NETWORK_INTERFACES; do
# skip loopback interface
if [ "$NET" = "lo" ]; then
continue
fi
echo "======= Configuring for $NET ======="
echo -n "Do you want to configure this interface? [y/n] "
read YN
if [ "$YN" != "y" ]; then
continue
fi
echo -n "Configure as static (default is DHCP)? [y/n] "
read YN
if [ "$YN" = "y" ]; then
read -p "Enter hostname: " HOSTNAME
read -p "Enter IP address: " IP_ADDR
read -p "Enter netmask: " NETMASK
read -p "Enter getway: " GATEWAY
read -p "Enter nameserver: " DNS
echo "network --bootproto=static --ip=$IP_ADDR --netmask=$NETMASK --device=$NET --gateway=$GATEWAY --nameserver=$DNS --hostname=$HOSTNAME" >> /mnt/sysimage/root/ks-pre.log
else
echo "network --bootproto=dhcp --device=$NET --hostname=$HOSTNAME" >> /mnt/sysimage/root/ks-pre.ks
fi
done
##Go back to tty1##
exec < /dev/tty1 > /dev/tty1
chvt 1
################################################
But I am getting this message (You see it on the pic)
How can I resolve it?
Thanks,
Shay
I am trying to configure manual network in the middle of the installion with kickstart.
so I found script to do it-
%include /mnt/sysimage/root/ks-pre.ks
%pre
exec < /dev/tty6 > /dev/tty6
chvt 6
clear
NETWORK_INTERFACES=$(ls /sys/class/net)
for NET in $NETWORK_INTERFACES; do
# skip loopback interface
if [ "$NET" = "lo" ]; then
continue
fi
echo "======= Configuring for $NET ======="
echo -n "Do you want to configure this interface? [y/n] "
read YN
if [ "$YN" != "y" ]; then
continue
fi
echo -n "Configure as static (default is DHCP)? [y/n] "
read YN
if [ "$YN" = "y" ]; then
read -p "Enter hostname: " HOSTNAME
read -p "Enter IP address: " IP_ADDR
read -p "Enter netmask: " NETMASK
read -p "Enter getway: " GATEWAY
read -p "Enter nameserver: " DNS
echo "network --bootproto=static --ip=$IP_ADDR --netmask=$NETMASK --device=$NET --gateway=$GATEWAY --nameserver=$DNS --hostname=$HOSTNAME" >> /mnt/sysimage/root/ks-pre.log
else
echo "network --bootproto=dhcp --device=$NET --hostname=$HOSTNAME" >> /mnt/sysimage/root/ks-pre.ks
fi
done
##Go back to tty1##
exec < /dev/tty1 > /dev/tty1
chvt 1
################################################
But I am getting this message (You see it on the pic)
How can I resolve it?
Thanks,
Shay