Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 181858 - add generic support for disabling init.d scripts at startup
Summary: add generic support for disabling init.d scripts at startup
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 185526 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-13 05:33 UTC by SpanKY
Modified: 2007-07-23 11:36 UTC (History)
1 user (show)

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


Attachments
Patch for /sbin/rc (rc-skip.diff,454 bytes, patch)
2007-07-11 09:14 UTC, Sadysta
Details | Diff
Usage instructions for rc-skip.diff (rc-skip.readme,238 bytes, text/plain)
2007-07-11 09:15 UTC, Sadysta
Details

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2007-06-13 05:33:22 UTC
should add support for kernel cmdlines like gentoo=no<init.d name>.d

so gentoo=noiptables.d would prevent iptables init.d script from starting at boot

need to make sure this doesnt prevent people from later doing:
/etc/init.d/iptables start
Comment 1 Roy Marples (RETIRED) gentoo-dev 2007-06-26 08:55:48 UTC
Interactive boot not good enough for you?
Comment 2 Sadysta 2007-07-11 09:14:52 UTC
Created attachment 124528 [details, diff]
Patch for /sbin/rc
Comment 3 Sadysta 2007-07-11 09:15:35 UTC
Created attachment 124530 [details]
Usage instructions for rc-skip.diff
Comment 4 Sadysta 2007-07-11 09:16:13 UTC
Comment on attachment 124530 [details]
Usage instructions for rc-skip.diff

Installation:

Apply `rc-skip.diff` to your `/sbin/rc` file

Usage (LILO):

boot: Gentoo gentoo-rc-skip=xdm,ntpd,samba

This kernel command line will prevent Gentoo from running the following
startup scripts: xdm, ntpd and samba.

Enjoy.
Comment 5 Roy Marples (RETIRED) gentoo-dev 2007-07-11 11:44:18 UTC
If we skip iptables and we then use rc to change to a different runlevel that contains iptables, should rc start iptables?

I'm thinking that if we do this then it should only affect the services when the system first boots.
Comment 6 SpanKY gentoo-dev 2007-07-11 21:41:36 UTC
correct, this should only affect first boot

it's annoying when you boot with say nox (to disable xdm), fix your X issues, and then try to start xdm by hand only to have the thing continue to abort for you
Comment 7 Roy Marples (RETIRED) gentoo-dev 2007-07-11 21:49:57 UTC
OK, how about if we want to skip foo, but bar needs it? Do we skip bar as well or do we start foo anyway?
Comment 8 Sadysta 2007-07-13 08:34:44 UTC
We skip bar. IMHO.
Comment 9 Roy Marples (RETIRED) gentoo-dev 2007-07-16 13:59:29 UTC
*** Bug 185526 has been marked as a duplicate of this bug. ***
Comment 10 Roy Marples (RETIRED) gentoo-dev 2007-07-20 13:30:01 UTC
That makes things overly complicated I think. Also, we have the issue where the user could take out a very needed service. For example, if they skip localmount then loads of services would fail.

If we simply remove the service from the automatic start list and nothing needs or uses it then it will be removed. This should suit most people as the majority of the skipped services would be modules or xdm I think.
Comment 11 SpanKY gentoo-dev 2007-07-20 21:54:18 UTC
i say we let the users shoot themselves in the foot

if they say "skip localmount", then you pretend localmount was started automatically and try to do everything as if it were ... otherwise you screw the people who do know what they're doing
Comment 12 Roy Marples (RETIRED) gentoo-dev 2007-07-23 11:36:52 UTC
I've committed a patch to our svn that works like so

noinitd=xdm,modules

Which will cause the xdm and modules init scripts not to be run, but only for the first boot.