Merge lp:~smoser/ubuntu/precise/sysvinit/rc.local.d into lp:ubuntu/precise/sysvinit
| Status: | Work in progress |
|---|---|
| Proposed branch: | lp:~smoser/ubuntu/precise/sysvinit/rc.local.d |
| Merge into: | lp:ubuntu/precise/sysvinit |
| Diff against target: |
100 lines (+55/-0) 5 files modified
debian/changelog (+8/-0) debian/initscripts.conffiles (+1/-0) debian/initscripts.postinst (+1/-0) debian/initscripts.postrm (+1/-0) debian/src/initscripts/etc/init.d/rc.local.d (+44/-0) |
| To merge this branch: | bzr merge lp:~smoser/ubuntu/precise/sysvinit/rc.local.d |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Scott Moser | Resubmit on 2012-02-07 | ||
| Clint Byrum | Needs Information on 2012-02-07 | ||
| Ubuntu branches | 2012-01-12 | Pending | |
|
Review via email:
|
|||
| Scott Moser (smoser) wrote : | # |
| Scott Moser (smoser) wrote : | # |
2 other thoughts:
* I chose adding rc.local.d versus modifying /etc/init.
* I had implemented this as an upstart job also, but felt sysv script fit better with the 'initscripts' package, which is where rc.local was provided.
| Clint Byrum (clint-fewbar) wrote : | # |
Scott this is pretty cool! However, I actually think rc.local *should* be moved to be run by an upstart job rather than rc2.d links. It should be:
# /etc/init/
start on stopped rc RUNLEVEL=[2345]
task
description "/etc/rc.local"
exec /etc/rc.local start
This would put it pretty much as late as possible in the boot, though it still does not address the fact that some things may be starting in parallel still if they have something like:
start on runlevel [2345]
But that is an issue with the current one as well.
Anyway, that should become part of upstart, and then the update-rc.d removed from initscripts. Then your job gets simpler:
# /etc/init/
start on stopped rc-local
task
description "local boot scripts (/etc/rc.local.d)"
pre-start script
[ -d /etc/rc.local.d ] || stop
command -v run-parts >/dev/null 2>&1 || stop
end script
exec run-parts /etc/rc.local.d
I like the idea of having two separate jobs because the user will get messages in noquiet boot (default for servers) that show
* Starting /etc/rc.local
* Stopping /etc/rc.local
* Starting local boot scripts (/etc/rc.local.d)
* Stopping local boot scripts (/etc/rc.local.d)
Would you be willing to move it over to upstart?
| Scott Moser (smoser) wrote : | # |
>
> I like the idea of having two separate jobs because the user will get messages
> in noquiet boot (default for servers) that show
>
> * Starting /etc/rc.local
> * Stopping /etc/rc.local
> * Starting local boot scripts (/etc/rc.local.d)
> * Stopping local boot scripts (/etc/rc.local.d)
>
> Would you be willing to move it over to upstart?
I have no objections to rc.local being a upstart job, but having the "sysvinit" package lay down a upstart job just seems strange at best to me. Thats why I stuck with sysvinit style start script.
If we think that rc.local should be an upstart job (and then, rc.local.d following that), I think thats a different bug. I really don't have a strong feeling.
| Scott Moser (smoser) wrote : | # |
I've updated bug 915215 in comment 7 with a summary of the state of this bug/feature.
Unmerged revisions
- 168. By Scott Moser on 2012-01-30
-
d/src/initscrip
ts/etc/ init.d/ rc.local. d: add rc.local.d
sysv-init script for executing things in /etc/rc.local.d
in run-parts style (LP: #915215)


This adds an additional rc.sysv script named 'rc.local.d' which will executable programs in /etc/rc.local.d via run-parts.
If run-parts is not available, or the directory /etc/rc.local.d does not exist, it will exit silently with success.