How to make blocking init-scripts?
Hi all, I just ran into some annoyance with the initial scripts that the autoinstall can perform: One of the tasks I do via such a script is the installation of all current updates and of some additional packages from an additional source. This does take a good while (depending on the machine I'm installing on - we still have some PIIIs running here...). However, I noticed that the machine will happily display the login screen even though this task has not finished yet. I find this undesirable, as i want the updates and installations to be finished before anything is started by a user (or root). Is it possible to write an init-script in a way that will make the machine wait for the script to finish before displaying the login screen? Cheerio, Thomas
On Thursday 23 February 2006 13:30, T. Ribbrock wrote:
Is it possible to write an init-script in a way that will make the machine wait for the script to finish before displaying the login screen?
you forgot to tell us your SUSE Linux version. That often makes it hard to help. Don't know if it helps but here is an idea: configure in your autoyast profile that the sysconfig variable "RUN_PARALLEL" in /etc/sysconfig/boot is set to "no". Try it like this: <sysconfig config:type="list" > <sysconfig_entry> <sysconfig_key>RUN_PARALLEL</sysconfig_key> <sysconfig_path>/etc/sysconfig/boot</sysconfig_path> <sysconfig_value>no</sysconfig_value> </sysconfig_entry> ... If that does not work, it might be that it's too late already to configure that special case in the autoyast profile (because boot process is already running when autoyast is parsing the <sysconfig> section). Then you should use a chroot script: <scripts> <chroot-scripts config:type="list"> <script> <chrooted config:type="boolean">true</chrooted> <filename>chroot.sh</filename> <interpreter>shell</interpreter> <source><![CDATA[ #!/bin/sh sed 's/RUN_PARALLEL=yes/RUN_PARALLEL=no' /etc/sysconfig/boot >/tmp/new mv /tmp/new /etc/sysconfig/boot ]]> </source> </script> both things are untested. Better check for syntax errors. -- ciao, Uwe Gansert Uwe Gansert, Server Technologies Team SUSE LINUX Products GmbH, Maxfeldstrasse 5, D-90409 Nuernberg, Germany e-mail: uwe.gansert@suse.de, Tel: +49-(0)911-74053-0, Fax: +49-(0)911-74053-476, Web: http://www.suse.de
On Thursday 23 February 2006 14:29, Uwe Gansert wrote:
sed 's/RUN_PARALLEL=yes/RUN_PARALLEL=no' /etc/sysconfig/boot >/tmp/new
see? Syntax error. There is a '/' missing at then end of the sed command. There might be more typos. -- ciao, Uwe Gansert Uwe Gansert, Server Technologies Team SUSE LINUX Products GmbH, Maxfeldstrasse 5, D-90409 Nuernberg, Germany e-mail: uwe.gansert@suse.de, Tel: +49-(0)911-74053-0, Fax: +49-(0)911-74053-476, Web: http://www.suse.de
On Thu, 23 Feb 2006, 14:35:55 +0100, Uwe Gansert wrote:
On Thursday 23 February 2006 14:29, Uwe Gansert wrote:
sed 's/RUN_PARALLEL=yes/RUN_PARALLEL=no' /etc/sysconfig/boot >/tmp/new
see? Syntax error. There is a '/' missing at then end of the sed command. There might be more typos.
And FWIW, GNU sed is smart enough to edit files in place; hence, the re-direction and renaming of the tmp file can be avoided: sed -i -e 's/RUN_PARALLEL=yes/RUN_PARALLEL=no/' /etc/sysconfig/boot Cheers. l8er manfred
And FWIW, GNU sed is smart enough to edit files in place; hence, the re- direction and renaming of the tmp file can be avoided:
sed - i - e 's/RUN_PARALLEL=yes/RUN_PARALLEL=no/' /etc/sysconfig/boot
And for the even lazier typists... sed - i 's/RUN_PARALLEL=yes/RUN_PARALLEL=no/' /etc/sysconfig/boot Yan
On Thu, 23 Feb 2006, 14:55:59 +0100, Yan Fitterer wrote:
And FWIW, GNU sed is smart enough to edit files in place; hence, the re- direction and renaming of the tmp file can be avoided:
sed - i - e 's/RUN_PARALLEL=yes/RUN_PARALLEL=no/' /etc/sysconfig/boot
And for the even lazier typists...
sed - i 's/RUN_PARALLEL=yes/RUN_PARALLEL=no/' /etc/sysconfig/boot
But _without_ the blank between - and i, of course ;-) Where did they come from, even in my quoted message? Cheers. l8er manfred
On Thu, Feb 23, 2006 at 02:29:51PM +0100, Uwe Gansert wrote:
On Thursday 23 February 2006 13:30, T. Ribbrock wrote:
Is it possible to write an init-script in a way that will make the machine wait for the script to finish before displaying the login screen?
you forgot to tell us your SUSE Linux version. That often makes it hard to help.
You're absolutely right - apologies. SuSE 10.0.
Don't know if it helps but here is an idea: configure in your autoyast profile that the sysconfig variable "RUN_PARALLEL" in /etc/sysconfig/boot is set to "no". Try it like this:
Ok, I'll try that in the next batch next week (including the kind sed suggestions of other folks... :-) ) and report back. Cheerio, Thomas
participants (4)
-
Manfred Hollstein
-
T. Ribbrock
-
Uwe Gansert
-
Yan Fitterer