probleme script with kickstart

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all
i have a problem with my script in kickstart
When i execute my script after the installation (without kickstart) it run without any problem (but when i restart the pc the change in ifconfig has been erase) and when i put it in the kickstart files the installation stop just after the boot loader installation and i have a lovely blue screen and i don't understand why.
here is my kickstart file
Thanks in advance for help bye

#Generated by Kickstart Configurator
lang en_US
langsupport en_US
mouse none
reboot
text
bootloader --useLilo --linear --location=mbr
install
cdrom
auth  --useshadow  --enablemd5
firewall --disabled
#Do not configure the X Window System
skipx
%packages
@RTLlos
%post
#PE 6/03/03
###Request all necessary variable###

question()
{
#ip adress
echo -e "What is your ip address : \c"
read IP
export IP

#default gateway
echo -e "what is your default gateway : \c"
read DFG
export DFG

#netmask
echo -e "what is your netmask : \c"
read NM
export NM

#Domain
echo -e "what is your domain : \c"
read DM
export DM

#hostname
echo -e "what is your hostname : \c"
read HN
export HN

#display all variables
clear

echo -e "The ip adress is : $IP"
echo -e "The default gateway is : $DFG"
echo -e "The netmask is : $NM"
echo -e "The Domain is : $DM "
echo -e "The hostname is : $HN"
echo -e "The dns is : $IP"
echo -e "Please confirm by y/n or quit: \c"
read ANSW
 case $ANSW in
        y)
          initnetwork
            ;;
        n)
          question
            ;;
        quit)
            echo $0" interrupted !!!"
            exit 1
            ;;
        *) echo Invalid choice
           sleep 1
           question
       esac
}

initnetwork()
{
#start configuration
#/etc/sysconfig/network-scripts/ifcfg-eth0
echo -e  "Make change in /etc/sysconfig/network-scripts/ifcfg-eth0"
echo "DEVICE=eth0">/etc/sysconfig/network-scripts/ifcfg-eth0
echo "BOOTPROTO=static">>/etc/sysconfig/network-scripts/ifcfg-eth0
echo "`ipcalc -b $IP $NM`">>/etc/sysconfig/network-scripts/ifcfg-eth0
echo "IPADR=$IP">>/etc/sysconfig/network-scripts/ifcfg-eth0
echo "NETMASK=$NM">>/etc/sysconfig/network-scripts/ifcfg-eth0
echo "`ipcalc -n $IP $NM`">>/etc/sysconfig/network-scripts/ifcfg-eth0
echo "ONBOOT=yes">>/etc/sysconfig/network-scripts/ifcfg-eth0

#/etc/sysconfig/network
echo -e  "Make change in /etc/sysconfig/network"
echo "NETWORKING=yes">/etc/sysconfig/network
echo "HOSTNAME=\"$HN\"">>/etc/sysconfig/network
echo "GATEWAY=$DFG">>/etc/sysconfig/network

#/etc/hosts
echo -e "Make change in /etc/hosts"
echo "127.0.0.1" "localhost.localdomain" "localhost">/etc/hosts
echo "$IP" "$HN" "$HN"."$DM">>/etc/hosts

# ifconfig
echo -e Make change in ifconfig
ifconfig eth0 down
ifconfig eth0 $IP netmask $NM
ifconfig eth0 up
route add default gw $DFG
}

losconf()
{
mount /mnt/cdrom
cp /mnt/cdrom/RedHat/RPMS/los-config-*.rpm /root/
}

Main()
{
question
losconf
exit 0
}







[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux