This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch feature/openbox in repository live-build-x2go. commit 1d69e1ebbd6ffd5d86879927d4afd391330a28e5 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Mon Jul 24 01:05:49 2017 +0200 autoupdate-patch for ramdisk mode --- .../lib/live/config/2400-live-autoupdate | 28 +++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/config/includes.chroot/lib/live/config/2400-live-autoupdate b/config/includes.chroot/lib/live/config/2400-live-autoupdate index b1960dc..c5a30ce 100755 --- a/config/includes.chroot/lib/live/config/2400-live-autoupdate +++ b/config/includes.chroot/lib/live/config/2400-live-autoupdate @@ -16,7 +16,7 @@ cleanup () else echo "\n$(date +'%F | %T | ')'$0': Could not remove directory '$TEMPDIR'." fi - if [ -n "$NTFSROOT" ]; then + if [ -n "$NTFSROOT" ] || [ -n "$RAMDISKMODE" ] ; then if umount $MOUNTPOINT; then echo "\n$(date +'%F | %T | ')'$0': Unmounted '$MOUNTPOINT'." else @@ -62,6 +62,29 @@ echo -n " live-autoupdater (backgrounding update task)" return 0 fi + if ! [ -d /lib/live/mount/findiso ] ; then + LISTOFPARTITIONS=$(grep -H ^0$ /sys/block/*/removable | awk -F '/' '{ print $4 }' | xargs -n 1 -I XXX fdisk -l /dev/XXX 2>/dev/null | awk '$0 ~ /Linux$/ { print $1}') + TEMPMOUNT=$(mktemp -d -p /lib/live/mount/) + FINDFILE=(cat /proc/cmdline | tr " " "\n" | awk -F '=' '$1 == "findiso" { print $2 }') + [ -z "$FINDFILE" ] && exit 0 + for PARTITON in $LISTOFPARTITIONS ; do + mount $PARTITION $TEMPMOUNT + if ! [ -f $FINDFILE ] ; then + umount $TEMPMOUNT + else + umount $TEMPMOUNT + mkdir /lib/live/mount/findiso + mount $PARTITION /lib/live/mount/findiso + RAMDISKMODE="yes" + break + fi + done + fi + if ! [ -d /lib/live/mount/findiso ] ; then + echo "\n$(date +'%F | %T | ')'$0': Local update directory not found. Exiting." + return 0 + fi + # Bandwidth limit goes here # #BWLIMITPERCENT=20 # in percent, numeric-only @@ -430,6 +453,9 @@ echo -n " live-autoupdater (backgrounding update task)" else echo "\n$(date +'%F | %T | ')'$0': Unable to remount '$MOUNTPOINT' ro and sync." fi + if [ -n "$RAMDISKMODE" ] ; then + umount $MOUNTPOINT + fi fi ) & -- 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