Hi,

On Fri, 14 Aug 2026 10:25:29 +0300 =?utf-8?q?Martin-=C3=89ric_Racine?= 
<[email protected]> wrote:
> Package: init-system-helpers
> Version: 1.69+nmu1
> Severity: important

I would not judge the severity of this bug as important because it only affects
users of sysvinit and update-rc.d still does what it should despite the
warning. But I let the maintainers change the severity.

> X-Debbugs-Cc: [email protected]
> 
> Upon executing dpkg-reconfigure on a random package, the following message 
> appeared:
> 
> Use of uninitialized value in string eq at /usr/sbin/update-rc.d line 196.
> 
> Hurd still uses sysv init, so I presume that this was caused by the recent 
> NMU (1.69+nmu1).

Yes it was. The error only happens when you have sysvinit-core installed.

> Init: sysvinit (via /sbin/init)

Which you have. :)

I fixed the problem in this MR:
https://salsa.debian.org/debian/init-system-helpers/-/merge_requests/35

>From the MR text:

Perl's readlink() returns undef when used on a regular file. The docs say:

> If there is a system error, returns the undefined value and sets $! (errno)

Turns out that "file is not a symlink" is a system error. :)

Turns out that all packages in Debian that ship /usr/sbin/init ship it as a
symlink -- except for sysvinit-core. This means that before this change, users
of sysvinit would see this message when update-rc.d is run:

    Use of uninitialized value in string eq at /usr/sbin/update-rc.d line 196.

The message is annoying but at least it's harmless. The part of the code that
emitted it was:

    readlink "$dpkg_root/usr/sbin/init" eq "../lib/systemd/systemd"

If readlink() returns undef, then the comparison fails as it should. I fixed it
by checking the type of /usr/sbin/init before doing readlink().

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature

Reply via email to