diff options
author | ramon <ramongomez@us.es> | 2018-01-25 17:02:41 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2018-01-25 17:02:41 +0000 |
commit | d43640a230285b9fe2aab0deabd1b80eaab0385c (patch) | |
tree | fdab943ec26a601f63232c823b9b82d4808aa69c /server/bin/oglivecli | |
parent | b51a508aeb09be6905a4b2216620803dd085b905 (diff) |
#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
Diffstat (limited to 'server/bin/oglivecli')
-rwxr-xr-x | server/bin/oglivecli | 4 |
1 files changed, 3 insertions, 1 deletions
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." |