RE: [suse-autoinstall] chroot-scripts not running
Mitko, This stuff is a little intricate, so don't be discouraged. It took me a couple of weeks to get my install working perfectly (and I was a novice). I don't think that's too bad. Anyway, do you want this .cgi file to exist after the system reboots? I am guessing that your problem is that you are not in the right directory to do the wget. Please note that the root filesystem on disk is mounted (as /mnt) during the chroot script execution. If you want to put anything on disk, you need to cd into /mnt (which becomes the root after the reboot), or some subdirectory, and *then* do the wget. A trick I have used during the scripting environments is to put an "exec /bin/bash" into the script. This essentially halts the script at that moment and it will not proceed until you terminate the bash shell. What you can do when the script stops is use ctl-alt-<f2> to switch to a tty shell and then poke around to see what's going on. Then you can use ps -ef to find the shell that you started, kill -9 it, and then the install proceeds. I hope this helps. It is definitely true that you will not see standard output from a script during its execution, and your file (/root/blah) will be lost because you are not writing it to disk. If you wrote to /mnt/blah, you'd see /blah on the reboot. -- Charlie -----Original Message----- From: Mitko Haralanov [mailto:mitko@pathscale.com] Sent: Thursday, February 24, 2005 6:47 PM To: suse-autoinstall@lists.suse.com Subject: [suse-autoinstall] chroot-scripts not running I did not really expect to have some many problems with this but I was wrong... As part of my auto-install I have a <chroot-scripts> script which notifies a server to remove the PXE boot file from the tftp server (that way, next time I boot the new machine, it won't try to run the install again). The chroot-script is the following: <chroot-scripts> <script> <filename>done-install</filename> <interpreter>shell</interpreter> <source> <![CDATA[# # Tell the install server we are done. # THIS MUST REMAIN THE LAST COMMAND. echo "We are running" > /root/blah wget http://1.2.3.4/cgi-bin/install-done.cgi ]]> </source> </script> </chroot-scripts> However, it does not seem to be running at all. The "echo" line does not produce anything and there is no sign of the wget in the http server logs. How can I verify that the script is running and the wget is doing what it is supposed to? Thanx -- Mitko Haralanov mitko@pathscale.com http://www.pathscale.com ========================================== Hackers are just a migratory lifeform with a tropism for computers. -- To unsubscribe, e-mail: suse-autoinstall-unsubscribe@suse.com For additional commands, e-mail: suse-autoinstall-help@suse.com
On Thu, 24 Feb 2005 19:29:32 -0500 "Suffin, Charles" <Charles.Suffin@stratus.com> wrote:
Anyway, do you want this .cgi file to exist after the system reboots? I am guessing that your problem is that you are not in the right directory to do the wget.
Thank you very much for you help! the .cgi file is actually located on a remove install server. I used 1.2.3.4 to hide ip addresses (just in case some is scrubbing the mailing list). I will try your 'exec /bin/bash idea to see the content of /mnt/root/blah. Thanx, again -- Mitko Haralanov mitko@pathscale.com http://www.pathscale.com ========================================== Is it possible that software is not like anything else, that it is meant to be discarded: that the whole point is to always see it as a soap bubble?
participants (2)
-
Mitko Haralanov
-
Suffin, Charles