summaryrefslogtreecommitdiffstats
path: root/server/bin
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2018-01-25 17:02:41 +0000
committerramon <ramongomez@us.es>2018-01-25 17:02:41 +0000
commitd43640a230285b9fe2aab0deabd1b80eaab0385c (patch)
treefdab943ec26a601f63232c823b9b82d4808aa69c /server/bin
parentb51a508aeb09be6905a4b2216620803dd085b905 (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')
-rwxr-xr-xserver/bin/oglivecli4
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."