From d43640a230285b9fe2aab0deabd1b80eaab0385c Mon Sep 17 00:00:00 2001 From: ramon Date: Thu, 25 Jan 2018 17:02:41 +0000 Subject: #768: Permitir solo 1 ficheros en subcomando {{{oglivecli install}}} con comodines en el nombre de la imagen ISO. git-svn-id: https://opengnsys.es/svn/branches/version1.1@5584 a21b9725-9963-47de-94b9-378ad31fedc9 --- server/bin/oglivecli | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'server') diff --git a/server/bin/oglivecli b/server/bin/oglivecli index 5be4e6dc..74b37275 100755 --- a/server/bin/oglivecli +++ b/server/bin/oglivecli @@ -289,7 +289,9 @@ function install() { local OGLIVEFILE OGLIVEDIST OGLIVEREV OGLIVEKRNL OGLIVEDIR OGINITRD OGSQFS OGCLIENT=ogclient local SAMBAPASS TMPDIR RSYNCSERV RSYNCCLNT [ $# -ne 1 ] && raiseError usage - OGLIVEFILE=$DOWNLOADDIR/"$1" + OGLIVEFILE=$(realpath $DOWNLOADDIR/$1) + # Only 1 file in pathname expansion. + [ $(echo $OGLIVEFILE | wc -w) -gt 1 ] && raiseError usage [ ! -f $OGLIVEFILE ] && raiseError notfound "Downloaded file: \"$1\"." [ ! -r $OGLIVEFILE ] && raiseError access "Downloaded file: \"$1\"." [ ! -w $(dirname $INFOFILE) ] && raiseError access "Configuration directory." -- cgit v1.2.3-18-g5258