Bug 116594 - firstboot is running everytime when switching runlevel
firstboot is running everytime when switching runlevel
Product: Fedora
Classification: Fedora
Component: firstboot (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Brent Fox
Depends On:
Blocks: FC2Blocker
  Show dependency treegraph
Reported: 2004-02-23 11:48 EST by David Jansen
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-03-04 18:35:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Jansen 2004-02-23 11:48:06 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):

How reproducible:

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.

Additional info:
Comment 1 Brent Fox 2004-02-24 14:48:11 EST
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?  
Comment 2 David Jansen 2004-02-24 16:43:49 EST
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)
Comment 3 David Jansen 2004-02-25 03:42:53 EST
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
Comment 4 Brent Fox 2004-03-04 18:35:56 EST
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 problem.

The fix should appear in firstboot-1.3.6-1.  Thanks for your report.

Note You need to log in before you can comment on or make changes to this bug.