[X2Go-Commits] [live-build-x2go] 33/108: last changes broke routines that check fixed disks for our magic label(s), mount them, and "do the needful" with them. This commit should fix this.
git-admin at x2go.org
git-admin at x2go.org
Wed Mar 20 22:13:11 CET 2019
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 b140c1cb63a01ca5b0faae520abbc0e6a7148c5b
Author: Stefan Baur (BAUR-ITCS) <kontakt at baur-itcs.de>
Date: Fri Feb 9 22:08:43 2018 +0100
last changes broke routines that check fixed disks for our magic label(s), mount them, and "do the needful" with them. This commit should fix this.
---
.../lib/live/config/2260-getsshhostkeysfrommedia | 12 ++++++------
.../lib/live/config/2270-getsshclientkeysfrommedia | 8 ++++----
.../lib/live/config/2280-x2go-getportableappsessions | 8 ++++----
3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia
index dc5ddd6..d7f1071 100755
--- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia
+++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia
@@ -76,14 +76,14 @@ GetSSHHostKeysFromMedia ()
sleep 1;
done
- # list devices (and mountpoints, if present)
- LABELMPLIST=$(lsblk -oLABEL,NAME,MOUNTPOINT,RM -ln)
+ # list devices (and mountpoints, if present)
+ LABELMPLIST=$(lsblk -oLABEL,RM,NAME,MOUNTPOINT -ln)
- # search for our magic label
- X2GOTCELIVELABELS=$(echo "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3 " " $4}')
+ # search for our magic label
+ X2GOTCELIVELABELS=$(echo "$LABELMPLIST" | awk '$1 == "X2GO-TCE-LIVE" { print $2 " " $3 " " $4}')
- # block device list, non-removable first (for security - we don't want USB media to be able to override keys on fixed disks)
- BLOCKDEVS="$(echo "$X2GOTCELIVELABELS" | awk '$3 == "0" {print $2}' ) $(echo "$X2GOTCELIVELABELS" | awk '$3 == "1" {print $2}' )"
+ # block device list, non-removable first (for security - we don't want USB media to be able to override keys on fixed disks)
+ BLOCKDEVS="$(echo "$X2GOTCELIVELABELS" | awk '$1 == "0" {print $2}' ) $(echo "$X2GOTCELIVELABELS" | awk '$1 == "1" {print $2}' )"
# for every block device in our list, do ...
for BLOCKDEV in $BLOCKDEVS; do
diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia
index 97345d0..0170290 100755
--- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia
+++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia
@@ -75,16 +75,16 @@ GetSSHClientKeysFromMedia ()
fi
# list devices (and mountpoints, if present)
- LABELMPLIST=$(lsblk -oLABEL,NAME,MOUNTPOINT,RM -ln)
+ LABELMPLIST=$(lsblk -oLABEL,RM,NAME,MOUNTPOINT -ln)
# search for our magic label
- X2GOTCELIVELABELS=$(echo "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3 " " $4}')
+ X2GOTCELIVELABELS=$(echo "$LABELMPLIST" | awk '$1 == "X2GO-TCE-LIVE" { print $2 " " $3 " " $4}')
# support for second label value (for dual-mode media where keys are stored on the windows-readable partition)
- PORTABLEAPPLABELS=$(echo "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="PORTABLEAPP" { print $2 " " $3 " " $4}')
+ PORTABLEAPPLABELS=$(echo "$LABELMPLIST" | awk '$1 == "PORTABLEAPP" { print $2 " " $3 " " $4}')
# block device list, removable first (we want USB media to be able to override keys on fixed disks)
- BLOCKDEVS="$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$3 == "1" {print $2}') $(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$3 == "0" {print $2}')"
+ BLOCKDEVS="$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$1 == "1" {print $2}') $(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$1 == "0" {print $2}')"
# for every block device in our list, do ...
for BLOCKDEV in $BLOCKDEVS; do
diff --git a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions
index dc45e39..61dee77 100755
--- a/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions
+++ b/config/includes.chroot/lib/live/config/2280-x2go-getportableappsessions
@@ -46,16 +46,16 @@ X2GoGetPortableAppSessions ()
fi
# list devices (and mountpoints, if present)
- LABELMPLIST=$(lsblk -oLABEL,NAME,MOUNTPOINT,RM -ln)
+ LABELMPLIST=$(lsblk -oLABEL,RM,NAME,MOUNTPOINT -ln)
# search for our magic label
- X2GOTCELIVELABELS=$(echo "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3 " " $4}')
+ X2GOTCELIVELABELS=$(echo "$LABELMPLIST" | awk '$1 == "X2GO-TCE-LIVE" { print $2 " " $3 " " $4}')
# support for second label value (for dual-mode media where config is stored on the windows-readable partition)
- PORTABLEAPPLABELS=$(echo "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="PORTABLEAPP" { print $2 " " $3 " " $4}')
+ PORTABLEAPPLABELS=$(echo "$LABELMPLIST" | awk '$1 == "PORTABLEAPP" { print $2 " " $3 " " $4}')
# block device list, removable first (we want USB media to be able to override configs on fixed disks)
- BLOCKDEVS="$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$3 == "1" {print $2}') $(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$3 == "0" {print $2}')"
+ BLOCKDEVS="$(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$1 == "1" {print $2}') $(echo "$X2GOTCELIVELABELS\n$PORTABLEAPPLABELS" | awk '$1 == "0" {print $2}')"
# for every block device in our list, do ...
for BLOCKDEV in $BLOCKDEVS; do
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
More information about the x2go-commits
mailing list