From bd4a17ff40129aa85f5fd3b1ffb93056eb22e36c Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Tue, 18 Feb 2020 09:55:29 +0100 Subject: #768: `oglivecli check` verifies if the linked directory matches the one defined by default. --- server/bin/oglivecli | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/bin/oglivecli b/server/bin/oglivecli index a8d29cd5..8af5937f 100755 --- a/server/bin/oglivecli +++ b/server/bin/oglivecli @@ -179,6 +179,9 @@ function check() { [ -n "$AUX" ] && echo "Some ISOs are downloaded after installation: ${AUX//$'\n'/, }" && let ERR++ AUX=$(jq -r '.oglive[] as $og | if ($og.revision[1:9] | tonumber) < '$MINREL' then $og.directory else "" end' $INFOFILE 2>/dev/null) [ -n "$AUX" ] && echo "Some installed ogLive aren't fully compatible: ${AUX//$'\n'/, }" && let ERR++ + DEF=$(jq -r ".oglive[$(getdefault)].directory" $INFOFILE 2>/dev/null) + INST=$(stat -c "%N" $TFTPDIR/$DEFOGLIVE | cut -f4 -d\') + [ "$DEF" != "$INST" ] && echo "Default ogLive is not linked to right directory: $DEF <> $INST" && let ERR++ # Print result. [ $ERR -eq 0 ] && echo "OK!" || echo "Problems detected: $ERR" return $ERR -- cgit v1.2.3-18-g5258