diff options
Diffstat (limited to 'modules.d/conf-tgz')
-rwxr-xr-x | modules.d/conf-tgz/hooks/s3-unpack-config-tgz.sh | 22 |
1 files changed, 12 insertions, 10 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 |