[X2Go-Commits] [live-build-x2go] 23/108: fixed bashisms, quoting, whitespace issues
git-admin at x2go.org
git-admin at x2go.org
Wed Mar 20 22:13:09 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 95d80544b937352db9cf20ad28853f07d03a8948
Author: Stefan Baur (BAUR-ITCS) <kontakt at baur-itcs.de>
Date: Tue Feb 6 15:55:40 2018 +0100
fixed bashisms, quoting, whitespace issues
---
.../lib/live/config/2260-getsshhostkeysfrommedia | 10 +++++-----
.../lib/live/config/2270-getsshclientkeysfrommedia | 4 ++--
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia
index ec4ac3b..c5f4594 100755
--- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia
+++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia
@@ -80,10 +80,10 @@ GetSSHHostKeysFromMedia ()
LABELMPLIST=$(lsblk -oLABEL,NAME,MOUNTPOINT,HOTPLUG -ln)
# search for our magic label
- X2GOTCELIVELABELS=$(echo -e "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3 " " $4}')
+ X2GOTCELIVELABELS=$(echo "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $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}')\n$(echo $X2GOTCELIVELABELS | awk '$3 == "1" {print $2}')"
+ BLOCKDEVS="$(echo "$X2GOTCELIVELABELS" | awk '$3 == "0" {print $2}' ) $(echo "$X2GOTCELIVELABELS" | awk '$3 == "1" {print $2}' )"
# for every block device in our list, do ...
for BLOCKDEV in $BLOCKDEVS; do
@@ -102,7 +102,7 @@ GetSSHHostKeysFromMedia ()
# so let's check if we have a config directory at that mountpoint.
if check_for_config $MNTPT ; then
# if we managed to pull a config off of it (or save one on it), we make a note of this ...
- echo -e "$LABELMPLIST" >/var/lib/live/config/opensshkeys
+ echo "$LABELMPLIST" >/var/lib/live/config/opensshkeys
# and quit right here.
exit 0
fi
@@ -123,7 +123,7 @@ GetSSHHostKeysFromMedia ()
if check_for_config /media/fixeddisks/$NEXTDEVICE ; then
# we umount, then make a note that we succeeded ...
umount /media/fixeddisks/$NEXTDEVICE
- echo -e "$LABELMPLIST" >/var/lib/live/config/opensshkeys
+ echo "$LABELMPLIST" >/var/lib/live/config/opensshkeys
# and quit right here.
exit 0
fi
@@ -138,7 +138,7 @@ GetSSHHostKeysFromMedia ()
fi
done
# Now let's leave a mark saying that we're done, so the next script can pick up on it.
- echo -e "$LABELMPLIST" >/var/lib/live/config/opensshkeys
+ echo "$LABELMPLIST" >/var/lib/live/config/opensshkeys
) &
}
diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia
index a04800d..4c8672e 100755
--- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia
+++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia
@@ -78,10 +78,10 @@ GetSSHClientKeysFromMedia ()
LABELMPLIST=$(lsblk -oLABEL,NAME,MOUNTPOINT,HOTPLUG -ln)
# search for our magic label
- X2GOTCELIVELABELS=$(echo -e "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="X2GO-TCE-LIVE" { print $2 " " $3 " " $4}')
+ X2GOTCELIVELABELS=$(echo "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $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 -e "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $1=="PORTABLEAPP" { print $2 " " $3 " " $4}')
+ PORTABLEAPPLABELS=$(echo "$LABELMPLIST" | awk '$3~/^[^\/]/ && $3="" ; $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}')"
--
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