diff options
author | Simon Rettberg | 2024-06-12 20:36:34 +0200 |
---|---|---|
committer | Simon Rettberg | 2024-06-12 20:36:34 +0200 |
commit | 1adce69713e62d6d9bd0b0a23542a1ebcd9a1a17 (patch) | |
tree | 0468ec245767f45098dc15de4d3ad0b6b58258c6 | |
parent | [busybox] Enable more options, disable rpm2cpio (diff) | |
download | systemd-init-1adce69713e62d6d9bd0b0a23542a1ebcd9a1a17.tar.gz systemd-init-1adce69713e62d6d9bd0b0a23542a1ebcd9a1a17.tar.xz systemd-init-1adce69713e62d6d9bd0b0a23542a1ebcd9a1a17.zip |
[config-tgz] Support multiple space separated local configs
-rwxr-xr-x | modules.d/conf-tgz/hooks/s3-unpack-config-tgz.sh | 22 | ||||
-rwxr-xr-x | modules.d/dnbd3-rootfs/hooks/s3-mount-root.sh | 1 |
2 files changed, 12 insertions, 11 deletions
diff --git a/modules.d/conf-tgz/hooks/s3-unpack-config-tgz.sh b/modules.d/conf-tgz/hooks/s3-unpack-config-tgz.sh index 0ab877dd..7bc93a69 100755 --- a/modules.d/conf-tgz/hooks/s3-unpack-config-tgz.sh +++ b/modules.d/conf-tgz/hooks/s3-unpack-config-tgz.sh @@ -35,19 +35,21 @@ if ! tar \ echo "Failed to extract '$config_tgz' to '$extract_dir'." exit 1 fi -# check SLX_LOCAL_CONFIGURATION +# check SLX_LOCAL_CONFIG . "/etc/openslx" -if [ -n "$SLX_LOCAL_CONFIGURATION" ]; then - if ! [ -d "${extract_dir}/openslx-configs/${SLX_LOCAL_CONFIGURATION}" ]; then - echo "Ignoring missing SLX_LOCAL_CONFIGURATION in '$config_tgz'." - else - tarcopy \ - "${extract_dir}/openslx-configs/${SLX_LOCAL_CONFIGURATION}" \ - "${extract_dir}" - fi +if [ -n "$SLX_LOCAL_CONFIG" ]; then + for mod in $SLX_LOCAL_CONFIG; do + if [ ! -d "${extract_dir}/openslx-configs/${mod}" ]; then + echo "Ignoring missing mod '$mod' in config.tgz" + else + tarcopy \ + "${extract_dir}/openslx-configs/${mod}" \ + "${extract_dir}" + fi + done fi # always purge openslx-configs/ -rm -rf "${extract_dir}/openslx-configs" +rm -rf -- "${extract_dir}/openslx-configs" # finally copy the rest into stage4 if ! tarcopy "${extract_dir}" "$NEWROOT"; then diff --git a/modules.d/dnbd3-rootfs/hooks/s3-mount-root.sh b/modules.d/dnbd3-rootfs/hooks/s3-mount-root.sh index 78410fce..ce19df02 100755 --- a/modules.d/dnbd3-rootfs/hooks/s3-mount-root.sh +++ b/modules.d/dnbd3-rootfs/hooks/s3-mount-root.sh @@ -1,6 +1,5 @@ #!/bin/bash -type emergency_shell >/dev/null 2>&1 || source /lib/dracut-lib.sh # $NEWROOT source "/etc/openslx" cnt=0 |