Package: mrtg
Version: 2.17.10-5+deb12u2
Severity: important
Installing MRRTG with SysV-rc yields:
Selecting previously unselected package mrtg.
(Reading database ... 101360 files and directories currently installed.)
Preparing to unpack .../mrtg_2.17.10-5+deb12u2_amd64.deb ...
Unpacking mrtg (2.17.10-5+deb12u2) ...
Setting up mrtg (2.17.10-5+deb12u2) ...
Starting MRTG
Daemonizing MRTG ...
Created symlink /etc/systemd/system/multi-user.target.wants/mrtg.service →
/lib/systemd/system/mrtg.service.
Then, the installation process hangs.
ps tree:
apt-get install mrtg
\_ /usr/bin/dpkg --status-fd 51 --configure --pending
\_ sh -c (test -x /usr/lib/needrestart/dpkg-status &&
/usr/lib/needrestart/dpkg-status || cat > /dev/null)
| \_ sh -c (test -x /usr/lib/needrestart/dpkg-status &&
/usr/lib/needrestart/dpkg-status || cat > /dev/null)
| \_ /bin/sh /usr/lib/needrestart/dpkg-status
\_ /usr/bin/perl -w /usr/share/debconf/frontend
/var/lib/dpkg/info/mrtg.postinst configure
\_ [mrtg.postinst] <defunct>
Killing debconf fronted leaves package in iF state. Mrtg is started and runs in
background, though.
Looking into where the hang occurs:
~ # bash -x /var/lib/dpkg/info/mrtg.postinst configure
+ set -e
+ getent group
+ grep -q mrtg
+ getent passwd
+ grep -q mrtg
+ chmod 2750 /etc/mrtg
+ chmod 0640 /etc/mrtg/mrtg.cfg
+ chown mrtg:mrtg /etc/mrtg
+ chown mrtg:mrtg /etc/mrtg/mrtg.cfg
+ . /usr/share/debconf/confmodule
++ '[' '!' '' ']'
++ PERL_DL_NONLAZY=1
++ export PERL_DL_NONLAZY
++ '[' '' ']'
++ exec /usr/share/debconf/frontend /var/lib/dpkg/info/mrtg.postinst configure
Starting MRTG
Daemonizing MRTG ...
/usr/bin/deb-systemd-helper was not called from dpkg. Exiting.
/usr/bin/deb-systemd-helper was not called from dpkg. Exiting.
/usr/bin/deb-systemd-helper was not called from dpkg. Exiting.
=> And hangs here.
Adding an "exit 0" in line 56 (before the dh_installinit/13.11.4 block) allow
the package configuration to succeed and the package state set to ii. Adding
exit 0 later in the script does not solve the hang, I have no explanation for
that.
-- System Information:
Debian Release: 12.5
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.1.0-20-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages mrtg depends on:
ii debconf [debconf-2.0] 1.5.82
ii init-system-helpers 1.65.2
ii libc6 2.36-9+deb12u4
ii libgd3 2.3.3-9
ii libsnmp-session-perl 1.14~git20221124T101957-1
ii perl 5.36.0-7+deb12u1
mrtg recommends no packages.
Versions of packages mrtg suggests:
ii apache2 [httpd] 2.4.57-2
ii lighttpd [httpd] 1.4.69-1
ii lynx [www-browser] 2.9.0dev.12-1
pn mrtg-contrib <none>
-- Configuration Files:
/etc/mrtg/mrtg.cfg [Errno 13] Permission denied: '/etc/mrtg/mrtg.cfg'
-- debconf information excluded