free beastie n00b
Joined: 20 Jan 2003 Posts: 40 Location: Bochum, Germany
|
Posted: Mon Jan 20, 2003 9:08 pm Post subject: Adding BEGIN script to runlevel boot? |
|
|
I want to share a swap partition on my FreeBSD/Gentoo multiboot box. There is a howto which mentions that you have to 'fingerprint' linux swap partitions (using mkswap) before swapon will accept them, so I need (presumably) a script in /etc/init.d/ which calls mkswap and is executed BEFORE localmount (which is the one to call swapon -a).
This is what I figured out, hopefully I got that right.
I don't want to alter the existing scripts since they may be overwritten by emerge baselayout. So the cleanest approach seems to me to include the mkswap-calling script into the 'boot' runlevel which contains
Code: | depend {
before localmount
} |
but this didn't work: my script got executed last, as seen on screen and documented in /mnt/.init.d/started/ .
(Yes, I did use rc-update add mkswap boot, where mkswap is the name of my script)
Tried the same with rl default, and with no begin clause in mkswap but 'depend mkswap' in localmount; all of which had the same result as mentioned above.
Now, am I missing something, or did I hit a bug in the docs or in the implementation?
Thanks in advance |
|