[X2Go-Commits] [live-build-x2go] 51/60: added cross-check - we now compare /dev/disks/by-label and lsblk output before moving on
git-admin at x2go.org
git-admin at x2go.org
Mon Nov 28 19:43:56 CET 2022
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch feature/mate-minidesktop-buster
in repository live-build-x2go.
commit bb2338df5bbaa29ed653aac8f8f1c91fe3a0d624
Author: Stefan Baur (BAUR-ITCS) <kontakt at baur-itcs.de>
Date: Sat Jun 27 23:55:30 2020 +0200
added cross-check - we now compare /dev/disks/by-label and lsblk output
before moving on
---
.../lib/live/config/2260-getsshhostkeysfrommedia | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia
index 63cb4ae..1f55119 100755
--- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia
+++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia
@@ -74,12 +74,18 @@ GetSSHHostKeysFromMedia ()
echo -n "\n$(date +'%F | %T | ')'$0' Waiting for udev to process all events ..." | tee -a /dev/tty8
udevadm settle
echo -n "\n$(date +'%F | %T | ')'$0' ... all events have been processed." | tee -a /dev/tty8
- echo -n "\n$(date +'%F | %T | ')'$0' Status of /dev/disk/by-label: '$(ls -lah /dev/disk/by-label/* | tr '\n' '|')'." | tee -a /dev/tty8
# list devices (and mountpoints, if present)
- LABELMPLIST=$(lsblk -oLABEL,RM,NAME,MOUNTPOINT -ln)
- echo -n "\n$(date +'%F | %T | ')'$0' Status of lsblk: '$(echo "$LABELMPLIST" | tr '\n' '|')'." | tee -a /dev/tty
+ while true; do
+ LABELLIST=$(ls -1 /dev/disk/by-label/ | sort -u | tr '\n' '|') # generated from /dev/disk/by-label/
+ echo -n "\n$(date +'%F | %T | ')'$0' Status of /dev/disk/by-label: '$LABELLIST'." | tee -a /dev/tty8
+
+ LABELMPLIST=$(lsblk -oLABEL,RM,NAME,MOUNTPOINT -ln)
+ LSBLKLIST=$(echo "$LABELMPLIST" | grep -v "^ " | awk '{print $1}' | sort -u | tr '\n' '|') # generated from lsblk
+ echo -n "\n$(date +'%F | %T | ')'$0' Status of lsblk: '$LSBLKLIST'." | tee -a /dev/tty8
+ [ "$LABELLIST" == "$LSBLKLIST" ] && break
+ done
# search for our magic label
X2GOTCELIVELABELS=$(echo "$LABELMPLIST" | awk '$1 == "X2GO-TCE-LIVE" { print $2 " " $3 " " $4}')
--
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