[Spacewalk-list] Help with kick-start.

themaster001 themaster001 at gmail.com
Thu Dec 20 22:39:15 UTC 2012


Guys,

If this isn't the right place to ask, please let me know. I am stuck
need to get this working.

I have two scripts that I use to kickstart with, the worked in the
passed but I am not sure if the KVM or the script, but when my
kickstart runs it hangs. The first script never comes and ask the
questions.

The first is as follows....

#====================================
# Questions to set up the host
#====================================

chvt 2

read -p
"What is the host fully-qualified name (ex. somehost.performancematters.com )?"
NAME < /dev/tty6 >/dev/tty6 2>&1

read -p
"What is the host IP Address?"
IP < /dev/tty6 >/dev/tty6 2>&1

read -p
"What is the host netmask?"
NM < /dev/tty6 >/dev/tty6 2>&1

read -p
"What is the host gatewalk?"
GATEWAY < /dev/tty6 >/dev/tty6 2>&1

read -p
"What network interface is the host using?"
INT < /dev/tty6 >/dev/tty6 2>&1

#==========================================
# Create /etc/sysconfig/network file
#==========================================

echo "NETWORKING_IPV6=no
HOSTNAME=${NAME}
NETWORKING=yes
GATEWAY=${GATEWAY}
"

# Create the network config
echo "DEVICE=${INT}
ONBOOT=yes
BOOTPROTO=static
NETWORK=10.0.0.0
IPADDR=${IP}
NETNASK=${NM}
BROADCAST=10.0.0.255
USERCTL=NO
IPV6INIT=no" > ifcfg-${INT}

echo ${INT} > tmp-int


chvt 1


The Second one is, this one is ran chrooted

cp /etc/resolv.conf /mnt/sysimage/etc/resolv.conf
# copy files
cp -f network /mnt/sysimage/etc/sysconfig/network
cp -f ifcfg-eth* /mnt/sysimage/etc/sysconfig/network-scripts
cp -f tmp-int /mnt/sysimage/root

# force hostname change
export LONG=`/mnt/sysimage/bin/grep -i hostname
/mnt/sysimage/etc/sysconfig/network | /mnt/sysimage/bin/cut -f2 -d=`
export SHORT=`/mnt/sysimage/bin/echo $LONG | /mnt/sysimage/bin/cut -f1 -d.`
/mnt/sysimage/bin/hostname $LONG

# setup variables for use in /etc/hosts
export INT=`/mnt/sysimage/bin/cat /mnt/sysimage/root/tmp-int`
export IP=`/mnt/sysimage/bin/grep -i ipaddr
/mnt/sysimage/etc/sysconfig/network-scripts/ifcfg-$INT |
/mnt/sysimage/bin/cut -f2 -d=`
echo "${IP}                     ${LONG} ${SHORT}" >>
/mnt/sysimage/etc/hosts

echo "HWADDR=`ip link show $INT | grep link | awk '{ print $2 }'`" >>
/mnt/sysimage/etc/sysconfig/network-scripts/ifcfg-$INT

/mnt/sysimage/bin/rm -f /mnt/sysimage/root/tmp-int

Is there a reason this doesn't work any more, also is there a better
way of doing this?


Chuck Payne




More information about the Spacewalk-list mailing list