Red Hat Bugzilla – Bug 116594
firstboot is running everytime when switching runlevel
Last modified: 2007-11-30 17:10:37 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)
Description of problem:
When switching to a different runlevel, the 'firstboot' service tries
to run. So the init script is unsuccessful in determining that it
should not run this service again.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. log in as root
2. type e.g. 'telinit 3' (or 5)
3. a couple of services which are already initialized are now
restarted (which is sort of a bug too). One of these is firstboot.
Actual Results: message:
Firstboot has already been run once on this system.
In order to run firstboot from the command line, run the following
commands: (etc, it's the message /usr/sbin/firstboot gives when run
from outside the init script)
Expected Results: I expected firstboot would not run again after
switching runlevel, or if it was run, it would recognize it has been
run before and just exit.
After firstboot runs, it calls '/sbin/chkconfig --del firstboot'.
That should prevent firstboot from ever running again.
Was firstboot ever run to completion on this system?
As far as I remember it ran without problems. Might it be that it was
added back when firstboot was upgraded to version 1.3.5-1 ?
$ rpm -qp --scripts firstboot-1.3.5-1.noarch.rpm
postinstall scriptlet (using /bin/sh):
chkconfig --add firstboot
preuninstall scriptlet (using /bin/sh):
if [ $1 = 0 ]; then
rm -rf /usr/share/firstboot/*.pyc
rm -rf /usr/share/firstboot/modules/*.pyc
chkconfig --del firstboot
(but I don't know much about the internals of rpms so I'm not sure in
which order those scripts will run from up2date)
I (sort of) managed to reproduce the problem: uninstalled the
firstboot rpm and installed the original one from cd. on next reboot,
firstboot was run, and after that, it shut itself off, as expected.
Next, ran up2date to update to latest firstboot, and voila, it
reactivated itself and the "Firstboot has already been run once on
this system" message is back.
Actually, not only when using 'telinit' to switch runlevels, but also
on boot, but hard to see of course since X starts up immediately after
Ah, I see. The problem is that we're rerunning chkconfig on the
upgrade. I've added a check to the specfile that will only run
chkconfig if /etc/sysconfig/firstboot does not exist. This should fix
The fix should appear in firstboot-1.3.6-1. Thanks for your report.