Merge lp://staging/~smoser/ubuntu/precise/sysvinit/rc.local.d into lp://staging/ubuntu/precise/sysvinit

Proposed by Scott Moser
Status: Work in progress
Proposed branch: lp://staging/~smoser/ubuntu/precise/sysvinit/rc.local.d
Merge into: lp://staging/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://staging/~smoser/ubuntu/precise/sysvinit/rc.local.d
Reviewer Review Type Date Requested Status
Scott Moser Needs Resubmitting
Clint Byrum (community) Needs Information
Ubuntu branches Pending
Review via email: mp+88323@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Scott Moser (smoser) wrote :

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.

Revision history for this message
Scott Moser (smoser) wrote :

2 other thoughts:
 * I chose adding rc.local.d versus modifying /etc/init.d/rc.local to add 'rc.local.d' support, because I felt that would have been more difficult to reliably detect if rc.local.d support was present. This seems less surprising.
 * 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.

Revision history for this message
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/rc-local.conf
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/rc-local-d.conf
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?

review: Needs Information
Revision history for this message
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.

review: Needs Resubmitting
Revision history for this message
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

d/src/initscripts/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)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: