Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 261139 - There is no script which executes before runlevel started
Summary: There is no script which executes before runlevel started
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-04 10:01 UTC by BigBug
Modified: 2009-03-04 18:30 UTC (History)
1 user (show)

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


Attachments
init.d entry (preboot,733 bytes, text/plain)
2009-03-04 10:03 UTC, BigBug
Details
conf.d entry for start (preboot.start,185 bytes, text/plain)
2009-03-04 10:03 UTC, BigBug
Details
conf.d entry for stop (preboot.stop,131 bytes, text/plain)
2009-03-04 10:04 UTC, BigBug
Details

Note You need to log in before you can comment on or make changes to this bug.
Description BigBug 2009-03-04 10:01:38 UTC
Sometimes there needed a sequence of command which is executed before any services in the default runlevel started (eg create directory structure in the tmpfs), but which not nececary for system core boot (eg not suitable for runlevel "boot")

Reproducible: Always




I have created such script, which may be added to the "default" runlevel. But there needed some syntax changes in the comments, because my english is bad :)
Comment 1 BigBug 2009-03-04 10:03:10 UTC
Created attachment 183857 [details]
init.d entry
Comment 2 BigBug 2009-03-04 10:03:41 UTC
Created attachment 183859 [details]
conf.d entry for start
Comment 3 BigBug 2009-03-04 10:04:11 UTC
Created attachment 183861 [details]
conf.d entry for stop
Comment 4 Matthias Schwarzott gentoo-dev 2009-03-04 11:08:10 UTC
Do I understand it correctly: You want to have something like /etc/init.d/local, but executed at the end of runlevel boot?

Do you have examples why we need this?

Btw. why do you call it preboot? It is not run before booting :)
Perhaps local.early is better.
Comment 5 BigBug 2009-03-04 11:13:22 UTC
no, i need a script which executes 1st when "default" runlevel starts. The boot runlevel is executed always, but this is user commands which needed to make services in be able to start or thing like this.

yes, local.early or something like this is better name than preboot.
Comment 6 Rafał Mużyło 2009-03-04 11:13:59 UTC
For me, it looks more like he wants to be able to ensure,
that a certain script is run as the very first in a given runlevel.

He said he doesn't want it in the boot level, cause it's needed only
for the given runlevel.
Comment 7 BigBug 2009-03-04 11:18:44 UTC
as example - create directory structure in tmpfs for programs which doesn't do this automatically, but configured to use them.
Comment 8 BigBug 2009-03-04 11:20:46 UTC
by the way: redhat/suse/debian have such script :)
Comment 9 Doug Goldstein (RETIRED) gentoo-dev 2009-03-04 17:49:07 UTC
Just create your init script. Put it in /etc/init.d and make sure you've got

depend() {
  before *
}

Then add it to the default runlevel.

This is definitely outside of the scope of what should go into OpenRC or baselayout.
Comment 10 SpanKY gentoo-dev 2009-03-04 18:30:34 UTC
yes, as Cardoe says, this is already possible