Bug#1119154: init-d-script: provide setpriv logic in a reusable form

Andrew Bower andrew at bower.uk
Mon Oct 27 19:43:13 GMT 2025


Package: sysvinit-utils
Version: 3.15-5
Severity: wishlist

Dear Maintainer,

Please could the logic to determine the setpriv wrapper command prefix be
provided in such a way as it can be used in stop, reload, prepare and cleanup
operations, etc.?

SETPRIV_ARGS=x works great if you only need to use it for daemon start but an
init-d-script script instantly looks ugly if the relevant code has to be copied
and pasted to use with other operations:

  if [ "$SETPRIV_ARGS" ]; then
    if ! PATH=/bin:/usr/bin command -v setpriv >/dev/null 2>&1; then
      echo "WARNING: setpriv not available, ignoring SETPRIV_ARGS" >&2
      unset SETPRIV_ARGS
    fi
  fi

Thanks,

Andrew


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

Kernel: Linux 6.16.11+deb14-amd64 (SMP w/24 CPU threads; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages sysvinit-utils depends on:
ii  libc6  2.41-12

sysvinit-utils recommends no packages.

sysvinit-utils suggests no packages.

-- no debconf information



More information about the Debian-init-diversity mailing list