diff options
author | ramon <ramongomez@us.es> | 2017-05-16 14:25:19 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2017-05-16 14:25:19 +0000 |
commit | 82ed0eb49f51b8f6b011e7b621f7a121213c77b8 (patch) | |
tree | 70e69aac4650a31f73b289026ff2927185d0f8ca /server/bin/oglivecli | |
parent | 9f71b83b61648282d9b15dbd6c323503fd433982 (diff) |
#768: Corregir errata que provocaba salida anticipada en el subcomando {{{oglivecli set-default}}}.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5302 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'server/bin/oglivecli')
-rwxr-xr-x | server/bin/oglivecli | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server/bin/oglivecli b/server/bin/oglivecli index 1914a00f..31f9cd07 100755 --- a/server/bin/oglivecli +++ b/server/bin/oglivecli @@ -171,7 +171,7 @@ function check() { if [ -z "$(stat -c "%N" $TFTPDIR/ogclient | awk '$3~/'$DEFOGLIVE'/ {print}')" ]; then echo "This server uses old ogclient, please run \"$PROG convert\" to update." let ERR++ - [ ! -f $INFOFILE ] && exit $ERR + [ ! -f $INFOFILE ] && return $ERR fi # Check for other problems. [ ! -f $INFOFILE ] && echo "Configuration file does not exists: $INFOFILE" && let ERR++ @@ -306,7 +306,7 @@ function install() { mkdir -p $OGLIVEDIR $TMPDIR trap "umount $TMPDIR; rm -fr $TMPDIR" 1 2 3 6 9 15 mount -o loop,ro $OGLIVEFILE $TMPDIR - cp -va $TMPDIR/ogclient/* $OGLIVEDIR || exit 2 + cp -va $TMPDIR/ogclient/* $OGLIVEDIR || raiseError access "Cannot copy files to ogLive directory." umount $TMPDIR rm -f $TFTPDIR/$DEFOGLIVE ln -vfs $(basename $OGLIVEDIR) $TFTPDIR/$DEFOGLIVE @@ -395,7 +395,6 @@ function setdefault() { OGLIVEDIR=$(jq -r ".oglive[$INDEX].directory" $INFOFILE) || raiseError notfound "Directory for index \"$INDEX\"." # Update default parameter. jq ".default=$INDEX" $INFOFILE | sponge $INFOFILE -exit # Link to default directory. rm -f $TFTPDIR/$DEFOGLIVE ln -vfs $(basename $OGLIVEDIR) $TFTPDIR/$DEFOGLIVE |