Bug#1094921: sysvinit-core: does not write entries to wtmpdb
- To: Lorenzo <plorenzo@disroot.org>
- Cc: 1094921@bugs.debian.org
- Subject: Bug#1094921: sysvinit-core: does not write entries to wtmpdb
- From: Andrew Bower <andrew@bower.uk>
- Date: Fri, 7 Feb 2025 23:34:28 +0000
- Message-id: <[🔎] Z6aYhHb2qaCDGGe8@arden.ab8.net>
- Reply-to: Andrew Bower <andrew@bower.uk>, 1094921@bugs.debian.org
- In-reply-to: <20250202235225.35cedf2d@lorenz.fritz.box>
- References: <Z56E3HiF8wYzgnAG@hindley.org.uk> <Z54hMy0zbgUF8OMK@shenstone.ab8.net> <Z5-aXcTioccfqu8S@shenstone.ab8.net> <Z54hMy0zbgUF8OMK@shenstone.ab8.net> <Z5_GffrIZb5oDz8u@shenstone.ab8.net> <20250202204512.2bb08f8d@lorenz.fritz.box> <Z5_c-VxiRohhGKl6@arden.ab8.net> <20250202230046.108b1d30@lorenz.fritz.box> <Z5_w51FL2kJlMjys@arden.ab8.net> <20250202235225.35cedf2d@lorenz.fritz.box> <Z54hMy0zbgUF8OMK@shenstone.ab8.net>
Hi Lorenzo,
On Sun, Feb 02, 2025 at 11:52:25PM +0100, Lorenzo wrote:
> On Sun, 2 Feb 2025 22:25:43 +0000
> Andrew Bower <andrew@bower.uk> wrote:
>
> > On Sun, Feb 02, 2025 at 11:00:46PM +0100, Lorenzo wrote:
> > > On Sun, 2 Feb 2025 21:00:41 +0000
> > > Andrew Bower <andrew@bower.uk> wrote:
> > >
> > > For the boot entry I can just remove the wtmpdb call in stage 1;
> > > for the shutdown entry in runit, is implemented as "halt -w[1]" in
> > > shutdown.c that is called by umountnfs.sh in runlevel 0 or 6, and
> > > it's not obvious to me how to prevent a double shutdown entry here.
> > > maybe the sysv script can be a no-op when runit is init?
> > >
> > > [ -f /run/runit.stopit ] && exit 0
> > >
> > > better ideas are welcome; when I added the code to runit I didn't
> > > think a sysv script was going to be accepted in the wtmpdb package.
> >
> > What about /etc/runit/override-sysv.d?
>
> yes, that would work too, I can ship the file with runit-init package.
Like this? Trivial patch here works for me, although I put it in the
wrong package!
I thought a .pkgblock file as described in the README would be ideal but
there is actually no logic to handle such a file - did you intend to add
it? Do you want me to raise a bug about that?
Thanks,
Andrew
>From db513f75e87bda28a33e1d81923a960f20df6e6b Mon Sep 17 00:00:00 2001
From: Andrew Bower <andrew@bower.uk>
Date: Fri, 7 Feb 2025 23:24:17 +0000
Subject: [PATCH] mask wtmpdb initscript in favour of runit's native
integration
---
debian/override-sysv.d/wtmpdb-update-boot.block | 0
debian/runit.install | 1 +
2 files changed, 1 insertion(+)
create mode 100644 debian/override-sysv.d/wtmpdb-update-boot.block
diff --git a/debian/override-sysv.d/wtmpdb-update-boot.block b/debian/override-sysv.d/wtmpdb-update-boot.block
new file mode 100644
index 0000000..e69de29
diff --git a/debian/runit.install b/debian/runit.install
index 2a5a09c..0ebc6c5 100644
--- a/debian/runit.install
+++ b/debian/runit.install
@@ -1,6 +1,7 @@
runit-*/doc/*[a-z].html /usr/share/doc/runit/html
debian/README-flagfiles /usr/share/doc/runit/
debian/README-overridesysv /usr/share/doc/runit/
+debian/override-sysv.d/* /etc/runit/override-sysv.d
debian/contrib/update-service /usr/sbin
debian/contrib/mk-runscript /usr/sbin
--
2.47.2
Reply to: