Re: Post Install Script questions

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

 



On Wed, 30 Apr 2003, Robert Denton wrote:

>I am working ona post install script and half seems to work the other half
>doesn't.  Here are the items I am having trouble with:
>
>%post --nochroot

Why --nochroot? You only work outside /mnt/sysimage for one line.

Suggest you split the %post into two; one --nochroot, the second
chrooted.

%post --nochroot
>cat /proc/mdstat >> /mnt/sysimage/root/ks-install.txt

%post
>echo "Kickstarted RH9: `date`" > /mnt/sysimage/root/ks-install.txt
>
>wget http://10.101.10.3/httpd.conf -o /root/wget.log
>/mnt/sysimage/sbin/chkconfig --level 345 httpd on
>service httpd start
>service httpd status >> /root/ks-install.txt
>
>echo "MAILADDR netadmin@xxxxxx" >> /mnt/sysimage/etc/mdadm.conf
>echo "mdadm -Fs --delay=6000 &" >> /mnt/sysimage/etc/rc.d/rc.local

Or activate the "mdmonitor" script in /etc/init.d

># Add user and set password
>useradd -G root phantom
>echo "menace" | passwd phantom --stdin
># this line will work just fine when you are logged in as root
># but it doesn't seem to work in %post

It's working on your nochroot /etc files

># Notify me with install log:
># as above, works from command line, not in post.
>mail robert@xxxxxx -s "`hostname` is ready." <
>/root/ks-install.txt

Again, no need for this to run nochrooted.


Hope this helps,
Phil





[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