diff options
| author | Jonathan Bauer | 2013-08-22 15:35:40 +0200 |
|---|---|---|
| committer | Jonathan Bauer | 2013-08-22 15:35:40 +0200 |
| commit | 92d8ecc99b197b2e0c0d1a2c5db3e60af7394d9b (patch) | |
| tree | 8dff6f6b2c9201041f5009f773470d5f0c3e7e8b | |
| parent | [rootfs-stage32] new service to setup slx addons separatly. Adapted systemd-s... (diff) | |
| download | tm-scripts-92d8ecc99b197b2e0c0d1a2c5db3e60af7394d9b.tar.gz tm-scripts-92d8ecc99b197b2e0c0d1a2c5db3e60af7394d9b.tar.xz tm-scripts-92d8ecc99b197b2e0c0d1a2c5db3e60af7394d9b.zip | |
[rootfs-stage32] unmount sqfs if the aufs'ing of the addon fails.
| -rwxr-xr-x | remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_slx_addons | 7 |
1 files changed, 6 insertions, 1 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 e482cfb6..661beac4 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 @@ -70,7 +70,11 @@ if [ $# == 1 ]; then # now append it to / echo "Appending ${ADDON_MOUNT_POINT} to /" - mount -o "remount,append:${ADDON_MOUNT_POINT}=ro" / || { echo "Failed to append ${ADDON_MOUNT_POINT} to the aufs." && exit 1; } + if ! mount -o "remount,append:${ADDON_MOUNT_POINT}=ro" / ; then + 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 @@ -80,5 +84,6 @@ if [ $# == 1 ]; then fi [ $# -gt 1 ] && { echo "Error - $0 only takes no or one argument. $# given." && exit 1; } + exit 0 |
