summaryrefslogtreecommitdiffstats
path: root/server/bin
diff options
context:
space:
mode:
authorRamón M. Gómez <ramongomez@us.es>2020-02-18 09:55:29 +0100
committerRamón M. Gómez <ramongomez@us.es>2020-02-18 09:55:29 +0100
commitbd4a17ff40129aa85f5fd3b1ffb93056eb22e36c (patch)
tree401b077db52c873a79487348cefaaf3a1efe80d6 /server/bin
parent19528454b8ef171ec1a873f5cd5179c11e8d8582 (diff)
#768: `oglivecli check` verifies if the linked directory matches the one defined by default.
Diffstat (limited to 'server/bin')
-rwxr-xr-xserver/bin/oglivecli3
1 files changed, 3 insertions, 0 deletions
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