Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 684 - /etc/init.d/bootmisc runs before /etc/init.d/localmount
Summary: /etc/init.d/bootmisc runs before /etc/init.d/localmount
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-02-13 13:46 UTC by Brent Cook
Modified: 2003-02-04 19:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Cook 2002-02-13 13:46:43 UTC
This causes lots of trouble because /var/run is never cleaned up if /var is a
separate partition. When starting from an unclean reboot, dhcpcd, gpm and others
will not start because there are stale .pid files left in /var/run.

/etc/init.d/bootmisc contains the lines:
depend() {
 need clock localmount
}

but this doesn't seem to matter.
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2002-02-14 20:56:47 UTC
I am working on this, just need to resolve a few interesting snags.
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2002-02-14 22:15:16 UTC
Just checking again .. you sure about this ?  Works fine this side .. ?

You can maybe paste the lines form init ?
Comment 3 Brent Cook 2002-02-14 22:55:57 UTC
Sure thing. This is with baselayout-1.7.1

Gentoo Linux; http://www.gentoo.org
 Copyright 2001 Gentoo Technologies, Inc.; Distributed under the GPL

 * Mounting /proc...                                                      [ ok ]
 * Mounting devfs at /dev...                                              [ ok ]
 * Mounting tmpfs at /dev/shm...                                          [ ok ]
 * Caching service dependencies...
Usage: alsasound {start|stop|restart|status}
 * Starting devfsd...
 /dev/ide/host0/bus0/target1/lun0: p1
 /dev/ide/host0/bus0/target1/lun0: p1                                     [ ok ]
 * Activating swap...
Adding Swap: 265032k swap-space (priority 1)                              [ ok ]
 * Cleaning /var/lock, /var/run...
/etc/init.d/runscript.sh: cd: /var/lock: No such file or directory
/etc/init.d/runscript.sh: cd: /var/run: No such file or directory
/etc/init.d/runscript.sh: /var/run/utmp: No such file or directory        [ ok ]
 * Cleaning /tmp directory...                                             [ ok ]
 * Checking all filesystems...
fsck 1.25 (20-Sep-2001)
/dev/hda2: clean, 4648/128768 files, 21654/257040 blocks                  [ ok ]
 * Remounting root filesystem read-only (if necessary)...                 [ ok ]
 * Checking root filesystem...
fsck 1.25 (20-Sep-2001)
/dev/hda3: clean, 223764/870912 files, 989064/1739036 blocks              [ ok ]
 * Remounting root filesystem read/write...                               [ ok ]
 * Setting system clock to hardware clock [UTC]...
Loading /usr/share/keymaps/i386/qwerty/us.kmap.gz
Loading /usr/share/keymaps/i386/include/windowkeys.inc.gz                 [ ok ]
 * Mounting local filesystems...                                          [ ok ]
 * Mounting USB device filesystem...                                      [ ok ]
 * Activating (possibly) more swap...                                     [ ok ]
 * Calculating module dependencies...                                     [ ok ]
 *   Loading module 3c59x...                                              [ ok ]

 * Bringing lo up...                                                      [ ok ]
 * Initializing random number generator...                                [ ok ]
INIT: Entering runlevel: 3
Comment 4 Brent Cook 2002-02-14 22:57:28 UTC
This is my fstab, if it matters:

# <fs>             <mountpoint>    <type>    <opts>          <dump/pass>

/dev/hda1          none            swap      pri=1           0 0
/dev/hda3          /               ext3      defaults        0 1
/dev/hda2          /var            ext3      defaults        0 2
/dev/cdroms/cdrom0 /mnt/cdrom      iso9660   noauto,ro,users 0 0
/dev/hdb1          /mnt/zip        auto      noauto,rw,users 0 0
/dev/fd0           /mnt/floppy0    auto      noauto,rw,users 0 0
//columbia/media   /mnt/media      smbfs    
noauto,rw,users,guest,dmask=755,uid=busterb,gid=users 0 0
proc               /proc           proc      defaults        0 0
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2002-02-15 11:43:07 UTC
There is a problem with some script in /etc/init.d. If you have a close look,
you will see that depscan.sh give error output about alsasound.  

----------cut-------------------
 * Caching service dependencies...
Usage: alsasound {start|stop|restart|status}
 * Starting devfsd...
----------cut-------------------

All scripts that do not follow the Gentoo rc-script style, should end with
a '.sh', like alsasound.sh.

Also, get rc-scripts-1.6.6.tbz2 (the latest) and copy at least 'depscan.sh',
'functions.sh' and 'runscripts.sh' from there to /etc/init.d/ replacing the
current ones to make sure you have the latest.

Lastly: running /etc/init.d/depscan.sh should exit cleanly (with the only 
output being "* Caching service dependencies...").
Comment 6 Brent Cook 2002-02-15 15:56:59 UTC
Renaming the alsasound init script did it. It seems that depscan.sh does not work correctly if it encounters a script that it does not understand. All is good, I suppose this issue can be closed, unless you want to try making initialization script dependency checking a little more fault-tolerant.



By the way, I could not find rc-scripts-1.6.6, only 1.2.5. Did I look in the wrong place (the ibiblio mirror)?
Comment 7 Martin Schlemmer (RETIRED) gentoo-dev 2002-02-16 18:54:22 UTC
Have already made them so on CVS (more fault tolerant), as it was needed
for features I added.

As from baselayout-1.7.1, the rc-scripts.tbz2 is kept on cvs, so have
a look in /usr/portage/sys-apps/baselayout/files/ , if you ever need it.