RE: problem %post script

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

 



Agreed...given how powerful these sections can be for truly customizing
an installation, the documentation is very, very light.  Almost
invisible.  =)  The responders on this list, however, have been
excellent resources.

Eric Lambert  



-----Original Message-----
From: james.oden@xxxxxxxxxxx [mailto:james.oden@xxxxxxxxxxx] 
Sent: Tuesday, March 11, 2003 7:28 AM
To: kickstart-list@xxxxxxxxxx
Subject: Re: problem %post script



You know this has been covered so many times of late, it seems like it
ought to go in the kickstart section of the rh manual.  Actually it
might be nice to have a little section talking about %pre and %post
script strategies and methods.

Cheers...james


 

                    "Cipriano Groenendal"

                    <cipri@xxxxxxxxx>            To:
<kickstart-list@xxxxxxxxxx>                                       
                    Sent by:                     cc:

                    kickstart-list-admin@        Subject:     Re:
problem %post script                                     
                    redhat.com

 

 

                    03/11/03 05:01 AM

                    Please respond to

                    kickstart-list

 

 





As has been said before, the %post script is executed in another
terminal, so put these lines in first:

#Change to virtual terminal number 3 to see echoed output /usr/bin/chvt
3

And these lines behind your script:

#Change to virtual terminal number 3 to see echoed output /usr/bin/chvt
1


Also, make sure the chvt package is installed.


As for network, are these files still correct after you reboot? Try the
archives, I've read something like this before, I think that time Kudzu
was to blame...

CIpri

----- Original Message -----
From: Pierrot
To: kickstart-list@xxxxxxxxxx
Sent: Monday, March 10, 2003 19:32
Subject: problem %post script


hello all
In fact I have 2 problem (I have made my own red hat 7.2cd that's for
why you can see 'rtl los in %packages') -first  is that when i put this
post script on my kickstart file the installation stop just after the
boot installer and i have a lovely blue screen and when i execute the
script after the installation it cause no trouble
- the second is not about kickstart but maybe someone can help me when i
execute that scrip all my parameters become good but when i reeboot the
"ifconfig" is erased here is my kickstart file thanks in advance for
your 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
#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
}
Mai



_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/kickstart-list





_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/kickstart-list





[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux