This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch feature/openbox-magic-pixel-workaround in repository live-build-x2go. commit 5128db6217887f2040ae8cc252d395482d428d71 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jul 24 19:21:19 2017 +0200 inserted proper umount/remount_ro -> moved into subroutine, as req'd in two places --- .../lib/live/config/2400-live-autoupdate | 41 +++++++++++++--------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index b736ade..22e2778 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -2,6 +2,28 @@ # this is not /bin/bash, so "echo -en" is not supported, but the default when calling "echo" +umount_or_remount_ro () +{# change mount back to ro and sync + # + if [ -n "$NTFSROOT" ]; then + if umount $MOUNTPOINT; then + echo "\n$(date +'%F | %T | ')'$0': Unmounted '$MOUNTPOINT'." + else + echo "\n$(date +'%F | %T | ')'$0': Unable to unmount '$MOUNTPOINT'." + fi + else + if mount -oremount,ro,sync $MOUNTPOINT; then + echo "\n$(date +'%F | %T | ')'$0': Remounted '$MOUNTPOINT' ro and sync." + else + echo "\n$(date +'%F | %T | ')'$0': Unable to remount '$MOUNTPOINT' ro and sync." + fi + if [ -n "$RAMDISKMODE" ] ; then + umount $MOUNTPOINT + fi + fi + +} + cleanup () { # discard contents of tmpfs, umount if necessary if [ -n "$NTFSROOT" ]; then @@ -377,6 +399,8 @@ echo -n " live-autoupdater (backgrounding update task)" [ -n "$NTFSROOT" ] && umount $MOUNTPOINT echo "\n$(date +'%F | %T | ')'$0': Nothing to do. Content of $DOWNLOADPATH equals" \ "$RUNNINGSYSTEMNAME." + # now, change mount back to ro and sync + umount_or_remount_ro return 0 # current is newest, nothing to do, # we want to keep the old system in OTHERSYSTEMFULLPATH # as a fallback @@ -453,22 +477,7 @@ echo -n " live-autoupdater (backgrounding update task)" # now, change mount back to ro and sync # - if [ -n "$NTFSROOT" ]; then - if umount $MOUNTPOINT; then - echo "\n$(date +'%F | %T | ')'$0': Unmounted '$MOUNTPOINT'." - else - echo "\n$(date +'%F | %T | ')'$0': Unable to unmount '$MOUNTPOINT'." - fi - else - if mount -oremount,ro,sync $MOUNTPOINT; then - echo "\n$(date +'%F | %T | ')'$0': Remounted '$MOUNTPOINT' ro and sync." - else - echo "\n$(date +'%F | %T | ')'$0': Unable to remount '$MOUNTPOINT' ro and sync." - fi - if [ -n "$RAMDISKMODE" ] ; then - umount $MOUNTPOINT - fi - fi + umount_or_remount_ro ) & -- Alioth's /srv/git/code.x2go.org/live-build-x2go.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git