summaryrefslogtreecommitdiffstats
path: root/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts
diff options
context:
space:
mode:
authorJonathan Bauer2013-11-28 14:05:51 +0100
committerJonathan Bauer2013-11-28 14:05:51 +0100
commit2b79d1ef56c328df25900575890803681b3e419d (patch)
tree7792bb07c0fafd90990bb44e21e32d3f1c43a0c3 /remote/rootfs/rootfs-stage32/data/opt/openslx/scripts
parent[systemd] english plx (diff)
downloadtm-scripts-2b79d1ef56c328df25900575890803681b3e419d.tar.gz
tm-scripts-2b79d1ef56c328df25900575890803681b3e419d.tar.xz
tm-scripts-2b79d1ef56c328df25900575890803681b3e419d.zip
[rootfs-stage32] pimping up systemd-setup_slx_addons for slxlog
Diffstat (limited to 'remote/rootfs/rootfs-stage32/data/opt/openslx/scripts')
-rwxr-xr-xremote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_slx_addons15
1 files changed, 8 insertions, 7 deletions
diff --git a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_slx_addons b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_slx_addons
index 633736f1..e587235e 100755
--- a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_slx_addons
+++ b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_slx_addons
@@ -56,33 +56,34 @@ if [ $# -eq 1 ]; then
ADDON="$1"
# sanity check
- [[ ! "$SLX_ADDONS" == *"$ADDON"* ]] && { echo "$ADDON is not listed in SLX_ADDONS of your config file. Skipping it." && exit 1; }
+ [[ ! "$SLX_ADDONS" == *"$ADDON"* ]] && \
+ { echo "$ADDON is not listed in SLX_ADDONS of your config file. Skipping it."; exit 1; }
# download the addon from the given URL
ADDON_TARGET_PATH="${SYS_TMP}/$(basename "$ADDON").sqfs"
if ! download "${SLX_BASE_PATH}/${ADDON}.sqfs" "${ADDON_TARGET_PATH}"; then
- slxlog "addon-setup" "Download of ${ADDON} failed."
+ slxlog --echo "addon-download" "Download of '${SLX_BASE_PATH}/${ADDON}.sqfs' failed."
exit 1
fi
# now mount it to $SLX_MNT/<addon-name>
ADDON_MOUNT_POINT="${SLX_BASE_MNT}/$(basename "$ADDON")"
mkdir -p "$ADDON_MOUNT_POINT"
- echo "Mounting ${ADDON_TARGET_PATH} to ${ADDON_MOUNT_POINT}"
- mount -t squashfs "$ADDON_TARGET_PATH" "$ADDON_MOUNT_POINT" || { echo "Failed to mount $ADDON_TARGET_PATH." && exit 1; }
+ mount -t squashfs "$ADDON_TARGET_PATH" "$ADDON_MOUNT_POINT" || \
+ { slxlog --echo "addon-mount" "Failed to mount $ADDON_TARGET_PATH."; exit 1; }
# now append it to /
echo "Appending ${ADDON_MOUNT_POINT} to /"
if ! mount -o "remount,append:${ADDON_MOUNT_POINT}=ro" / ; then
- echo "Failed to append ${ADDON_MOUNT_POINT} to the aufs. Cleaning up..."
+ slxlog --echo "Failed to append ${ADDON_MOUNT_POINT} to the aufs. Cleaning up..."
umount -l ${ADDON_MOUNT_POINT} || echo "Could not unmount ${ADDON_MOUNT_POINT}!"
exit 1
fi
# Run post-hook if available
if [ -x "$ADDON_MOUNT_POINT/addon-init" ]; then
- echo "Running addon initialization script..."
- "$ADDON_MOUNT_POINT/addon-init" || echo "Warning: Could not execute addon-init of $ADDON"
+ "$ADDON_MOUNT_POINT/addon-init" || \
+ slxlog --echo "addon-init" "Warning: Could not execute addon-init of $ADDON"
fi
fi