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 
> # Start the ks-install log with date and time of build
> # this one works...
> echo "Kickstarted RH9: `date`" > /mnt/sysimage/root/ks-install.txt 
> 
> # Retrieve customized httpd.conf and take care of webservice: 
> # problem: this doesn't seem to be wgotten and the log is not created...
> wget http://10.101.10.3/httpd.conf -o /mnt/sysimage/root/wget.log 
> # problem: the httpd service doesn't start upon reboot and the status 
> # isn't written to the ks-install.txt
> /mnt/sysimage/sbin/chkconfig --level 345 httpd on 
> service httpd start 
> service httpd status >> /mnt/sysimage/root/ks-install.txt 

chroot /mnt/sysimage/ <<Z
/sbin/chkconfig --level 345 httpd on
service httpd start
service httpd status >>/root/ks-install.txt
# etc
Z


> 
> # make sure the raid is okay and is monitored upon boot: 
> # this seems to work...
> cat /proc/mdstat >> /mnt/sysimage/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 
> 
> # 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
> 
> # Notify me with install log:
> # as above, works from command line, not in post.
> mail robert@xxxxxx -s "`hostname` is ready." <
> /mnt/sysimage/root/ks-install.txt 
> 
> 
> 
> 
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list@xxxxxxxxxx
> https://listman.redhat.com/mailman/listinfo/kickstart-list
> 

-- 
Please, reply only to the list.

Join the "Linux Support by Small Businesses" list at
http://mail.computerdatasafe.com.au/mailman/listinfo/lssb






[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