Re: post installation scripts

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

 



Peter,

A chmod 700 /root/install.sh might help.

Second, .bashrc might not be the place where you will want to do things
like this, since it is executed every time a subshell starts, including
xterms, probably execs, and the install.sh script. You might want to use
/root/.bash_profile or /etc/rc.local? (/etc/rc.local might not work if it
is an interactive script though.)

And to make things more readable, use inline scripting, like
cat << END >> /mnt/sysimage/root/.bashrc
if [ -f /root/.unconfigured ]
then
  rm -f /root/.unconfigured
  exec /root/install.sh
  /usr/sbin/netcfg
fi
END

Regards, Wouter.

Peter Lewandowski <Peter.Lewandowski@xxxxxxxxx> on 14-06-2001 10:37:38

Please respond to kickstart-list@xxxxxxxxxx

To:   "'kickstart-list@xxxxxxxxxx'" <kickstart-list@xxxxxxxxxx>
cc:
Subject:  post installation scripts




Hi,

I'm trying to copy some files on to the newly installed redhat machine in
the %post section of the kickstart file, but it all just hangs! This is
what
I'm trying to do:


%post --nochroot
cp -p /mnt/source/extra/install.sh /mnt/sysimage/root

# root user should run the script at startup
touch /mnt/sysimage/root/.unconfigured
echo "if [ -f /root/.unconfigured ]; then " >> /mnt/sysimage/root/.bashrc
echo "  rm -f /root/.unconfigured" >>/mnt/sysimage/root/.bashrc
echo "  exec /root/install.sh" >> /mnt/sysimage/root/.bashrc
echo "  /usr/sbin/netcfg" >>  /mnt/sysimage/root/.bashrc
echo "fi">>/mnt/sysimage/root/.bashrc

Does it matter where in the %post section i put this code?

Best Regards,

________________________________
Peter Lewandowski, M.Sc.Th
CYGATE AB
Software Engineer, Cygate Labs
Box 749, Invernessvägen 2
S-182 17 DANDERYD, SWEDEN
Phone: + 46 8 630 51 92
Mobile: + 46 70 690 61 51
Web: www.cygategroup.com



_______________________________________________
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