diff options
author | Jonathan Bauer | 2018-11-12 12:17:19 +0100 |
---|---|---|
committer | Jonathan Bauer | 2018-11-12 17:30:33 +0100 |
commit | cd1b40ba72c2165b799e8adce871d0b8be76aec6 (patch) | |
tree | cdd4b7688bbf28c5c7606ecde134d4361debd3b7 /builder/modules.d/slx-uuid/module-setup.sh | |
parent | in bridge mode, do not copy the physical interface configuration (diff) | |
download | systemd-init-cd1b40ba72c2165b799e8adce871d0b8be76aec6.tar.gz systemd-init-cd1b40ba72c2165b799e8adce871d0b8be76aec6.tar.xz systemd-init-cd1b40ba72c2165b799e8adce871d0b8be76aec6.zip |
[slx-uuid] Detects and exposes system UUID
for various openslx-related scripts
Diffstat (limited to 'builder/modules.d/slx-uuid/module-setup.sh')
-rwxr-xr-x | builder/modules.d/slx-uuid/module-setup.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/builder/modules.d/slx-uuid/module-setup.sh b/builder/modules.d/slx-uuid/module-setup.sh new file mode 100755 index 00000000..875c9f77 --- /dev/null +++ b/builder/modules.d/slx-uuid/module-setup.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +check() { + # Tell dracut that this module should only be included if it is required + # explicitly. + if ! hash dmidecode; then + echo "dmidecode is missing from this system, please install it." + return 1 + fi + return 255 +} +depends() { + echo dnbd3-rootfs +} +install() { + mkdir -p "$initdir/etc/bad-uuid.d" + inst_simple "$moddir/bad-uuid-defaults.conf" "/etc/bad-uuid.d/bad-uuid-defaults.conf" + inst_multiple dmidecode head + inst_hook pre-mount 05 "$moddir/scripts/get-system-uuid.sh" + inst_hook pre-pivot 10 "$moddir/scripts/copy-system-uuid-to-newroot.sh" +} |