diff options
author | Jonathan Bauer | 2020-01-09 11:11:24 +0100 |
---|---|---|
committer | Jonathan Bauer | 2020-01-09 11:11:24 +0100 |
commit | 33549adb535a539dad595557b762bdfda86490cd (patch) | |
tree | 99917ff0c34f95dec2160729a16a3c6c3d4ae912 | |
parent | [slx-uuid] update uuid blacklist (diff) | |
download | systemd-init-33549adb535a539dad595557b762bdfda86490cd.tar.gz systemd-init-33549adb535a539dad595557b762bdfda86490cd.tar.xz systemd-init-33549adb535a539dad595557b762bdfda86490cd.zip |
[slx-uuid] check if uuid blacklists exists
... and use these instead of the default one from this module
-rwxr-xr-x | builder/modules.d/slx-uuid/module-setup.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/builder/modules.d/slx-uuid/module-setup.sh b/builder/modules.d/slx-uuid/module-setup.sh index 569b5155..1e550136 100755 --- a/builder/modules.d/slx-uuid/module-setup.sh +++ b/builder/modules.d/slx-uuid/module-setup.sh @@ -13,7 +13,16 @@ depends() { } install() { mkdir -p "$initdir/etc/bad-uuid.d" - inst_simple "$moddir/bad-uuid-defaults.conf" "/etc/bad-uuid.d/bad-uuid-defaults.conf" + # check if we have an uuid blacklists installed by openslx/mltk on this system + if [ "$(ls -A /opt/openslx/bad-uuid.d)" ]; then + for blacklist in "/opt/openslx/bad-uuid.d"/* ]; do + inst_simple "$blacklist" "/etc/bad-uuid.d/${blacklist##*/}" + done + else + # use this module's default blacklist + inst_simple "$moddir/bad-uuid-defaults.conf" "/etc/bad-uuid.d/bad-uuid-defaults.conf" + fi + inst_multiple dmidecode inst_hook pre-udev 05 "$moddir/scripts/get-system-uuid.sh" inst_hook pre-pivot 10 "$moddir/scripts/copy-system-uuid-to-newroot.sh" |