I am using autoyast w/ SuSE 10 and I am trying to reboot from a postinstall script.
I’m doing an online update in the post-script, and I would like to make sure that
the system comes up with the new kernel.
So, this is what I have in my postinstall script:
> >>> #!/bin/sh
> >>>
> >>> cat /etc/init.d/rc3.d/S99reboot << EOF
> >>>
> >>> #!/bin/sh
> >>> rm /etc/init.d/rc3.d/S99reboot
> >>> reboot
> >>>
> >>> EOF
This partially works, when Yast is completed, it reboots… However, it keeps rebooting over and over. It seems the code inside of S99reboot is never executed.
Does the system boot to runlevel three? I guess if it didn’t you
probably wouldn’t see the reboots happen over and over (unless that is
an unrelated event that happens to take place now). Perhaps have the
output (STDERR/STDOUT) from your ‘rm’ command go to a file you can
review after one of the reboots in case there is an error in there to be
read.
Good luck.
e11768 wrote:
| I am using autoyast w/ SuSE 10 and I am trying to reboot from a
| postinstall script.
| I’m doing an online update in the post-script, and I would like to make
| sure that
| the system comes up with the new kernel.
|
| So, this is what I have in my postinstall script:
|>>>> #!/bin/sh
|>>>>
|>>>> cat /etc/init.d/rc3.d/S99reboot << EOF
|>>>>
|>>>> #!/bin/sh
|>>>> rm /etc/init.d/rc3.d/S99reboot
|>>>> reboot
|>>>>
|>>>> EOF
|
| This partially works, when Yast is completed, it reboots… However, it
| keeps rebooting over and over. It seems the code inside of S99reboot is
| never executed.
|
| Any help will be appretiated.
| Thanks
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
Well, actually the problem is that the code inside the S99reboot script is not executed… I tested it putting an empty script S99reboot inside the rc3.d directory and I saw the same behavior, it keeps rebooting over and over… even with an empty script without any reboot command
I do not understand this script. The cat statement outputs the contents of /etc/init.d/rc3.d/S99reboot and there is a ‘here document’ as standard input to cat, which it does not read (so it goes into the dustbin).
I supose you either want to add something to S99reboot which goes like:
Well that’s good to know… so where do you have your reboot command
running? I presume this did NOT happen before you added whatever
software you are working on. Probably not the simplest thing to do but
if you could get a diff of relevant files before/after the software you
could track down where the problem is happening. Try loading to
runlevel 2 explicitly to make sure it doesn’t reboot. Try runlevel 5
for fun as well. If you get reboots in those scenarios perhaps it’s
something earlier in the boot process but, if not, the next step is to
find a reboot in /etc/init.d/rc3.d. What do you see on your screen
before it goes back down?
Good luck.
e11768 wrote:
| Well, actually the problem is that the code inside the S99reboot script
| is not executed… I tested it putting an empty script S99reboot inside
| the rc3.d directory and I saw the same behavior, it keeps rebooting over
| and over… even with an empty script without any reboot command
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
Basically what is enclosed between EOF label will be the content of the S99reboot script.
The idea is that when the initialization happens, the system will reboot to take into account the kernel patches that were installed.
The issue is that it reboots over and over. It seems that the content of S99reboot is not executed, it just reboots…
Well, the last test I performed, I did not have any reboot command running, that is the issue. It is rebooting just by adding S99reboot (empty) in the /etc/init.d/rc3.d
Well that’s strange… tried something else like S99rebootForMyApp?
Good luck.
e11768 wrote:
| Well, the last test I performed, I did not have any reboot command
| running, that is the issue. It is rebooting just by adding S99reboot
| (empty) in the /etc/init.d/rc3.d
|
| If I remove S99reboot, it works fine.
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org