[opensuse-autoinstall] 11.4: Problem with postinstallscript for fixing the second-stage-bug
Hello, I try to install a system opensuse 11.4 with autoyast. To "fix" the rpmcopy_secondstage_bug I run the following script in chroot: --------------------------------------- <script> <!-- Fix post-packages bug --> <chrooted config:type="boolean">true</chrooted> <filename>fix_postinstall_bug.sh</filename> <interpreter>shell</interpreter> <source><![CDATA[#!/bin/bash ( while [ ! -f /var/lib/YaST2/installation_disabled_steps ]; do sleep 1 done cp /var/lib/YaST2/installation_disabled_steps /var/lib/YaST2/installation_disabled_steps.bkp cat /var/lib/YaST2/installation_disabled_steps.bkp | grep -v "rpmcopy_secondstage" > /var/lib/YaST2/installation_disabled_steps) &]]> </source> </script> --------------------------------------------------------- The script is called during the installation but it seems that it is abborted before the file installation_disabled_steps is generated. The log shows: ------------------------------ 2012-06-05 04:48:10 <1> instze32(3283) [Interpreter] clients/autoinst_scripts2_finish.ycp:58 Calling YaST client autoinst_scripts2_finish 2012-06-05 04:48:10 <1> instze32(3283) [YCP] clients/autoinst_scripts2_finish.ycp:33 starting autoinst_scripts2_finish 2012-06-05 04:48:10 <1> instze32(3283) [YCP] AutoinstScripts.ycp:715 Writing chroot script into /var/adm/autoinstall/scripts/fix_postinstall_bug.sh 2012-06-05 04:48:10 <1> instze32(3283) [YCP] AutoinstScripts.ycp:766 Script Execution command: /bin/sh -x /var/adm/autoinstall/scripts/fix_postinstall_bug.sh 2&> /var/adm/autoinstall/logs/fix_postinstall_bug.sh.log 2012-06-05 04:48:10 <1> instze32(3283) [YCP] clients/autoinst_scripts2_finish.ycp:58 autoinst_scripts2_finish finished 2012-06-05 04:48:10 <1> instze32(3283) [Interpreter] clients/autoinst_scripts2_finish.ycp:58 Called YaST client returned. 2012-06-05 04:48:10 <1> instze32(3283) [wfm] Y2CCWFM.cc(createInLevel):148 Parsing finished 2012-06-05 04:48:10 <1> instze32(3283) [Interpreter] clients/installation_settings_finish.ycp:108 Calling YaST client installation_settings_finish 2012-06-05 04:48:10 <1> instze32(3283) [YCP] clients/installation_settings_finish.ycp:29 starting installation_settings_finish 2012-06-05 04:48:10 <1> instze32(3283) [YCP] clients/installation_settings_finish.ycp:44 Writing disabled modules ["system_analysis", "update_partition_auto", "add-on", "productsources", "user", "user_non_interactive", "auth", "initialization", "netprobe", "rpmcopy_secondstage", "hostname", "ask_net_test", "do_net_test", "addon_update_sources", "extrasources", "ask_online_update", "you", "restore_settings", "release_notes", "save_hardware_status", "congratulate", "lan", "disks_activate"] into /var/lib/YaST2/installation_disabled_steps --------------------------------------- Any hints about that? Regards Daniel + '[' '!' -f /var/lib/YaST2/installation_disabled_steps ']' + sleep 1 + '[' '!' -f /var/lib/YaST2/installation_disabled_steps ']' + sleep 1 + '[' '!' -f /var/lib/YaST2/installation_disabled_steps ']' + sleep 1 + '[' '!' -f /var/lib/YaST2/installation_disabled_steps ']' + sleep 1 ---------------------------------- Thats all..... In y2log you can see that the installaion_disabled_steps is generated after the scripts can do their job.... ------------------------------- -- Daniel Spannbauer Software Entwicklung marco Systemanalyse und Entwicklung GmbH Tel +49 8333 9233-27 Fax -11 Rechbergstr. 4 - 6, D 87727 Babenhausen Mobil +49 171 4033220 http://www.marco.de/ Email ds@marco.de Geschäftsführer Martin Reuter HRB 171775 Amtsgericht München -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
On 05.06.2012 11:14, Daniel Spannbauer wrote:
The script is called during the installation but it seems that it is abborted before the file installation_disabled_steps is generated.
I don't like the solution with the sleep anyway. That looks like an invitation to a race. Better try this: In the installed system, there is a directory called /usr/lib/YaST2/startup/hooks/preSecondCall/ The yast startscript will execute all scripts in that directory before it really launches yast. If you put a script in there with the name "S01xxxxx.sh", you still have time to fix /var/lib/YaST2/installation_disabled_steps with that script before yast starts and reads it. So your chroot script should create the S01xxx.sh script that fixes the installation_disabled_steps file then. The S01 prefix is important. So much for theory. I did not try it but I'm confident it works. It's fixed in 12.1 - maybe that's an option too :) -- ciao, Uwe Gansert SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer Home: http://www.suse.de/~ug - Blog: http://suse.gansert.net -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
Am 06/05/2012 12:18 PM, schrieb Uwe Gansert:
On 05.06.2012 11:14, Daniel Spannbauer wrote:
The script is called during the installation but it seems that it is abborted before the file installation_disabled_steps is generated.
I don't like the solution with the sleep anyway. That looks like an invitation to a race.
Better try this: In the installed system, there is a directory called
/usr/lib/YaST2/startup/hooks/preSecondCall/
The yast startscript will execute all scripts in that directory before it really launches yast. If you put a script in there with the name "S01xxxxx.sh", you still have time to fix /var/lib/YaST2/installation_disabled_steps with that script before yast starts and reads it.
So your chroot script should create the S01xxx.sh script that fixes the installation_disabled_steps file then. The S01 prefix is important.
So much for theory. I did not try it but I'm confident it works.
It's fixed in 12.1 - maybe that's an option too :)
Yes....this seems to be the cleaner method :) Works...tanks. Regards Daniel -- Daniel Spannbauer Software Entwicklung marco Systemanalyse und Entwicklung GmbH Tel +49 8333 9233-27 Fax -11 Rechbergstr. 4 - 6, D 87727 Babenhausen Mobil +49 171 4033220 http://www.marco.de/ Email ds@marco.de Geschäftsführer Martin Reuter HRB 171775 Amtsgericht München -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
Hello Daniel, could you please post your complete autoyast XML code that creates the corresponding file and fixes the problem? :-) Thanks! On 06/05/2012 03:44 PM, Daniel Spannbauer wrote:
Am 06/05/2012 12:18 PM, schrieb Uwe Gansert:
On 05.06.2012 11:14, Daniel Spannbauer wrote:
The script is called during the installation but it seems that it is abborted before the file installation_disabled_steps is generated.
I don't like the solution with the sleep anyway. That looks like an invitation to a race.
Better try this: In the installed system, there is a directory called
/usr/lib/YaST2/startup/hooks/preSecondCall/
The yast startscript will execute all scripts in that directory before it really launches yast. If you put a script in there with the name "S01xxxxx.sh", you still have time to fix /var/lib/YaST2/installation_disabled_steps with that script before yast starts and reads it.
So your chroot script should create the S01xxx.sh script that fixes the installation_disabled_steps file then. The S01 prefix is important.
So much for theory. I did not try it but I'm confident it works.
It's fixed in 12.1 - maybe that's an option too :)
Yes....this seems to be the cleaner method :) Works...tanks.
Regards
Daniel
-- Dipl.-Ing. Joschi Brauchle, M.S. Institute for Communications Engineering (LNT) Technische Universitaet Muenchen (TUM) 80290 Munich, Germany Tel (work): +49 89 289-23474 Fax (work): +49 89 289-23490 E-mail: joschi.brauchle@tum.de Web: http://www.lnt.ei.tum.de/
Am 06/25/2012 05:34 PM, schrieb Joschi Brauchle:
Hello Daniel,
could you please post your complete autoyast XML code that creates the corresponding file and fixes the problem? :-)
Thanks!
Hello, that code works here (see attachment) Regards Daniel
On 06/05/2012 03:44 PM, Daniel Spannbauer wrote:
Am 06/05/2012 12:18 PM, schrieb Uwe Gansert:
On 05.06.2012 11:14, Daniel Spannbauer wrote:
The script is called during the installation but it seems that it is abborted before the file installation_disabled_steps is generated.
I don't like the solution with the sleep anyway. That looks like an invitation to a race.
Better try this: In the installed system, there is a directory called
/usr/lib/YaST2/startup/hooks/preSecondCall/
The yast startscript will execute all scripts in that directory before it really launches yast. If you put a script in there with the name "S01xxxxx.sh", you still have time to fix /var/lib/YaST2/installation_disabled_steps with that script before yast starts and reads it.
So your chroot script should create the S01xxx.sh script that fixes the installation_disabled_steps file then. The S01 prefix is important.
So much for theory. I did not try it but I'm confident it works.
It's fixed in 12.1 - maybe that's an option too :)
Yes....this seems to be the cleaner method :) Works...tanks.
Regards
Daniel
-- Daniel Spannbauer Software Entwicklung marco Systemanalyse und Entwicklung GmbH Tel +49 8333 9233-27 Fax -11 Rechbergstr. 4 - 6, D 87727 Babenhausen Mobil +49 171 4033220 http://www.marco.de/ Email ds@marco.de Geschäftsführer Martin Reuter HRB 171775 Amtsgericht München
Hi list, is it possible to generate a udev_rule like: SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", KERNELS=="0000:02:00.0", ATTR{dev_id}=="0x0", ATTR{type}= ="1", KERNEL=="eth*", NAME="eth0" via autoyast just with xml tags without using a script? Thanks, Jochen
Uwe Gansert <ug@suse.de> 05.06.12 12.19 Uhr >>> On 05.06.2012 11:14, Daniel Spannbauer wrote:
The script is called during the installation but it seems that it is abborted before the file installation_disabled_steps is generated.
I don't like the solution with the sleep anyway. That looks like an invitation to a race. Better try this: In the installed system, there is a directory called /usr/lib/YaST2/startup/hooks/preSecondCall/ The yast startscript will execute all scripts in that directory before it really launches yast. If you put a script in there with the name "S01xxxxx.sh", you still have time to fix /var/lib/YaST2/installation_disabled_steps with that script before yast starts and reads it. So your chroot script should create the S01xxx.sh script that fixes the installation_disabled_steps file then. The S01 prefix is important. So much for theory. I did not try it but I'm confident it works. It's fixed in 12.1 - maybe that's an option too :) -- ciao, Uwe Gansert SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer Home: http://www.suse.de/~ug - Blog: http://suse.gansert.net -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
participants (4)
-
Daniel Spannbauer
-
Jochen Schaefer
-
Joschi Brauchle
-
Uwe Gansert