diff options
-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 |