diff options
author | Jonathan Bauer | 2019-08-12 18:13:34 +0200 |
---|---|---|
committer | Jonathan Bauer | 2019-08-12 18:13:34 +0200 |
commit | 52d9afd9d0a4d1cbae9d7bf4155f9497021a5962 (patch) | |
tree | 52925b2e09c522d0d15f223489ed1cd96577ef29 /builder | |
parent | [slx-addons] make WHITEOUTS an array (diff) | |
download | systemd-init-52d9afd9d0a4d1cbae9d7bf4155f9497021a5962.tar.gz systemd-init-52d9afd9d0a4d1cbae9d7bf4155f9497021a5962.tar.xz systemd-init-52d9afd9d0a4d1cbae9d7bf4155f9497021a5962.zip |
[slx-addons] simplify addon whiteout handling
and fix if none where found
Diffstat (limited to 'builder')
-rw-r--r-- | builder/modules.d/slx-addons/scripts/setup-addons.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/builder/modules.d/slx-addons/scripts/setup-addons.sh b/builder/modules.d/slx-addons/scripts/setup-addons.sh index 0e208daf..701f5d25 100644 --- a/builder/modules.d/slx-addons/scripts/setup-addons.sh +++ b/builder/modules.d/slx-addons/scripts/setup-addons.sh @@ -71,12 +71,12 @@ setup_addon() { done # post merge: remove whiteouts from filesystem - local WHITEOUTS=("$NEWROOT/opt/openslx/etc/"*".whiteout") - if [ -e "$WHITEOUTS" ]; then + for WHITEOUT in "$NEWROOT/opt/openslx/etc/"*.whiteout; do + [ -e "$WHITEOUT" ] || continue while read line; do rm -f "${NEWROOT}/${line}" - done < <(cat ${WHITEOUTS[@]}) - fi + done < "$WHITEOUT" + done # finally update ld.so.cache expected to be under /opt/openslx/etc/<addon_name>.ld.so.cache # NOTE: if we have more than one addon in the future, we need to be extra |