ZG-POLICY-RC.D(8)

πŸŽ€ ZG-POLICY-RC.D πŸŽ€

okay bestie, so this is zg-policy-rc.d, a lil script from the policyrcd-script-zg2 package (v 0.1), and it's here to let you handle policy-rc.d in a way more flexible way than usual. sit down, grab a strawberry πŸ“, we're doing sysadmin lore.


✨ NAME ✨

zg-policy-rc.d β€” it lets you do flexible handling of policy-rc.d. that's the whole vibe. πŸ’…


πŸ“– DOCUMENTATION πŸ“–

so here's the situation: zg-policy-rc.d is a script, and what it does is give you flexible handling of the policy-rc.d script. now, the reason this exists at all is lowkey tea β˜• β€” invoke-rc.d only ever looks for policy-rc.d in /usr/sbin, and bestie, if you just... dropped your own local binaries in there?? that would be a policy violation. not the moment. πŸ™ˆ

hence, this script. ✨

here's the cute part: the script tries to set an environment variable called POLICYRCD, and then it executes the file that variable points to. so whatever POLICYRCD is pointing at becomes, effectively, the policy-rc.d script. main character energy honestly. πŸ‘‘

if POLICYRCD is already set when zg-policy-rc.d gets invoked, then the existing value just gets used, no drama. but if it's not set, the script goes on a little journey 🌈 β€” it 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, and it stops the second one of them sets POLICYRCD. if POLICYRCD is still not set after all that? then /etc/zg-policy-rc.d.conf gets sourced, to see if it'll set it. fingers crossed 🀞

and if literally no configuration file sets POLICYRCD? then it gets set to /usr/local/sbin/policy-rc.d if that exists, or to /etc/policy-rc.d otherwise. whichever one it lands on, the selected script then gets executed. periodt. πŸ’–


πŸ› BUGS πŸ›

Many. 😭 like, many many.

Be prepared to debug. fr fr. πŸ’€


πŸ‘‘ AUTHOR πŸ‘‘

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


okay that's the whole page, you ate it up 🫢 this was policyrcd-script-zg2 version 0.1, dated 2026-03-28 β€” go be iconic with your policy scripts, bestie πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from