
Originally Posted by
semiRocket
The predefined directory for administrator's unit files is /etc/systemd/system/, /usr/lib/systemd/ is reserved for packages.
Where is that documented, please.
And there goes only systemd "units",
not scripts
Would you PLEASE document your claim that this placement of a script is invalid - b/c someone then needs to file a bunch of bugzillas against numerous system packages.
Code:
[stevea@hypoxylon ~]$ cat /usr/lib/systemd/system-shutdown/mdadm.shutdown
#!/bin/sh
# We need to ensure all md arrays with external metadata
# (e.g. IMSM, DDF) are clean before completing the shutdown.
/usr/sbin/mdadm --wait-clean --scan
or
Code:
[stevea@hypoxylon ~]$ grep -r "^#!" /usr/lib/systemd/
/usr/lib/systemd/system-generators/anaconda-generator:#!/bin/bash
/usr/lib/systemd/system-generators/kdump-dep-generator.sh:#!/bin/sh
/usr/lib/systemd/system-shutdown/mdadm.shutdown:#!/bin/sh
/usr/lib/systemd/fedora-dmraid-activation:#!/bin/bash
/usr/lib/systemd/fedora-autorelabel:#!/bin/bash
/usr/lib/systemd/fedora-domainname:#!/usr/bin/bash
/usr/lib/systemd/fedora-import-state:#!/bin/bash
/usr/lib/systemd/fedora-loadmodules:#!/bin/bash
/usr/lib/systemd/fedora-readonly:#!/bin/bash
/usr/lib/systemd/systemd-sanlock:#!/bin/bash
/usr/lib/systemd/systemd-wdmd:#!/bin/bash
I appreciate that you created a much better solution to the OPs problem- but systemd remains IMO woefully documented, and you making unsupported personal claims about how it should work (in ways that defy RH practice) isn't helping.
For example "man systemd-shutdown" documents some limited features of the binary, but says nothing about the appropriate way to add administrative features to the shutdown event.