Help wanted to finalise wtmpdb init integration
Lorenzo
plorenzo at disroot.org
Wed Mar 5 11:20:11 GMT 2025
On Wed, 5 Mar 2025 10:29:31 +0000
Mark Hindley <mark at hindley.org.uk> wrote:
> On Wed, Mar 05, 2025 at 11:18:35AM +0100, Lorenzo wrote:
> > the problem is that the init script should not "restart" on start
> > action;
> > this is usually done with a check on the pid with
> > start-stop-daemon, but wtmpdb is a oneshot so you cant do that.
>
the above was a bit confusing, what I mean here is that if you call the
script twice in a row, like
# /etc/init.d/wtmpdb-update-boot start
# /etc/init.d/wtmpdb-update-boot start
the second call (and all subsequent calls) should be a no-op
> I think you can just override it:
>
> do_restart_override() {
> : # no-op
> }
>
> Mark
this could be a safe measure to avoid extra reboot entries, but
I think for the issue reported by Andrew we need to work on the
do_start_cmd_override() {
/usr/bin/wtmpdb boot
}
section of the script
Lorenzo
More information about the Debian-init-diversity
mailing list