Scroll to navigation

ZG-POLICY-RC.D(8) policyrcd-script-zg2 ZG-POLICY-RC.D(8)

NAME

zg-policy-rc.d - allows flexible handling of policy-rc.d

DOCUMENTATION

zg-policy-rc.d is a script which provides flexible handling of the policy-rc.d script. As invoke-rc.d only looks for policy-rc.d in /usr/sbin, putting local binaries there would be a policy violation.

Hence, this script.

The script attempts to set an environment variable, POLICYRCD, and execute the file pointed to by that variable. This way, whatever POLICYRCD points to becomes the policy-rc.d script.

If POLICYRCD is already set when zg-policy-rc.d is invoked, the existing value is used. Otherwise, the script sources the .conf files under /usr/local/etc/zg-policy-rc.d.conf.d and /etc/zg-policy-rc.d.conf.d one at a time, stopping if one of them sets POLICYRCD. If POLICYRCD is still not set, /etc/zg-policy-rc.d.conf is sourced to see if it will set it.

If no configuration file sets POLICYRCD, it is set to /usr/local/sbin/policy-rc.d if it exists, or /etc/policy-rc.d otherwise. The selected script is then executed.

BUGS

Many. Be prepared to debug.

AUTHOR

Marc Haber <mh+debian-packages@zugschlus.de>

2026-03-28 policyrcd-script-zg2 0.1