Package: rasdaemon
Version: 0.6.6-1
Severity: normal

The mountdebugfs script is no longer provided by the blktrace package,
since a while back:

        blktrace (1.2.0-1) unstable; urgency=medium
        ...
          * Remove debugfs mounting init script, as systemd is moutning debugfs
            by default nowadays (Closes: #873470, #705269)
        ...
         -- Bas Zoetekouw <b...@debian.org>  Sat, 19 May 2018 21:49:22 +0200

Bug #705269 provides some detail:

        https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=705269#10

An error:

        insserv: FATAL: service mountdebugfs has to be enabled to use service 
rasdaemon

is produced when the package is upgraded.

Therefore, another method to detect if debugfs is mounted is needed.
I came out with the initscript hack bellow, that informs the user and
also extends the script actions.  Is this an acceptable workaround?

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.7.0-2-amd64 (SMP w/8 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF-8), LANGUAGE=en_US.UTF-8
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages rasdaemon depends on:
ii  init-system-helpers  1.58
ii  libc6                2.31-3
ii  libdbd-sqlite3-perl  1.64-1+b1
ii  libsqlite3-0         3.32.3-1
ii  perl                 5.30.3-4
ii  sqlite3              3.32.3-1

rasdaemon recommends no packages.

rasdaemon suggests no packages.

-- Configuration Files:
/etc/init.d/rasdaemon changed:
command -v rasdaemon >/dev/null 2>&1 || exit 0
. /lib/lsb/init-functions
pm=/proc/mounts
[ -r $pm ] || {
        log_failure_msg "Can't read $pm"
        exit 1
}
d=/sys/kernel/debug
t=debugfs
grep -qE "^[^[:blank:]]+[[:blank:]]+$d[[:blank:]]+$t[[:blank:]]" $pm || {
        log_failure_msg "$t not mounted on $d"
        exit 2
}
case $1 in
        start)
                log_action_begin_msg "Starting rasdaemon"
                rasdaemon --record
                log_action_end_msg "$?"
                rasdaemon --enable
                log_action_end_msg "$?"
                ras-mc-ctl --register-labels
                log_action_end_msg "$?"
                ;;
        stop)
                log_action_begin_msg "Stopping rasdaemon"
                rasdaemon --disable
                log_action_end_msg "$?"
                ;;
        restart)
                $0 stop
                $0 start
                ;;
        force-reload|status)
                ;;
        *)
                log_failure_msg "Usage: $0 start|stop|restart"
                exit 3
                ;;
esac


-- no debconf information


Cheers,

-- 
Cristian

Reply via email to