[X2Go-Commits] [live-build-x2go] 21/166: added support for incomplete and dash-separated ntfs uuids

git-admin at x2go.org git-admin at x2go.org
Mon Nov 20 02:16:40 CET 2017


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch feature/mate-minidesktop
in repository live-build-x2go.

commit 2a9ae55f12a3410e20acf6e7d668e623f6358b6d
Author: Stefan Baur (BAUR-ITCS) <kontakt at baur-itcs.de>
Date:   Mon Jan 2 02:30:50 2017 +0100

    added support for incomplete and dash-separated ntfs uuids
---
 config/includes.chroot/lib/live/config/2300-autoupdate | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/config/includes.chroot/lib/live/config/2300-autoupdate b/config/includes.chroot/lib/live/config/2300-autoupdate
index 3f3b9ac..38a579b 100755
--- a/config/includes.chroot/lib/live/config/2300-autoupdate
+++ b/config/includes.chroot/lib/live/config/2300-autoupdate
@@ -100,6 +100,16 @@ sleep $SLEEPTIME
 NTFSROOT=$(cat /proc/cmdline | tr ' ' '\n' | awk -F '=' '/^ntfs-uuid/ { print $2 }')
 if [ -n "$NTFSROOT" ]; then
 	mkdir -p /lib/live/mount/ntfsroot
+	# This is in case we've been passed an incomplete UUID and/or one with dashes
+	# For example, "vol c:" on Windows will return the last 8 digits of the UUID
+        # only, and separate them with a dash.
+	if ! [ -L "/dev/disk/by-uuid/$NTFSROOT" ]; then
+		NTFSROOT=$(echo $NTFSROOT | tr -d '-')
+		if ! [ -L "/dev/disk/by-uuid/$NTFSROOT" ]; then
+			NTFSROOT=$(echo /dev/disk/by-uuid/*$NTFSROOT | tr ' ' '\n' | head -1)
+		fi
+	fi
+
 	mount -t ntfs-3g -rw /dev/disk/by-uuid/$NTFSROOT /lib/live/mount/ntfsroot
 	MOUNTPOINT="/lib/live/mount/ntfsroot/"
 	# create a temporary directory

--
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


More information about the x2go-commits mailing list