diff options
author | adv <adv@uma.es> | 2011-12-23 16:29:54 +0000 |
---|---|---|
committer | adv <adv@uma.es> | 2011-12-23 16:29:54 +0000 |
commit | b92b4bbf39cb59ec3aebcd680a09e1613a001eeb (patch) | |
tree | 0978cd37b2399cee5cb6e8994f540072d599b560 /client/shared/scripts/createImage | |
parent | 5ccb9998d61d67780388707a731e1daf73186cd8 (diff) |
#469 createImage con engine.cfg
git-svn-id: https://opengnsys.es/svn/branches/version1.0@2421 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/shared/scripts/createImage')
-rwxr-xr-x | client/shared/scripts/createImage | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/client/shared/scripts/createImage b/client/shared/scripts/createImage index 3bba9d36..9d3cf647 100755 --- a/client/shared/scripts/createImage +++ b/client/shared/scripts/createImage @@ -38,10 +38,13 @@ # test 5. intentar crear una imagen, en la que no se puede reducir el FS. TIME1=$SECONDS -OGLOGSESSION="/tmp/session.log" -OGLOGCOMMAND="/tmp/command.log" +#OGLOGSESSION="/tmp/session.log" +#OGLOGCOMMAND="/tmp/command.log" +#Carga del configurador del engine +[ -z $OGENGINECONFIGURATE ] && source /opt/opengnsys/etc/engine.cfg + PROG="$(basename $0)" @@ -50,10 +53,11 @@ if [ $# -ne 4 ]; then exit $? fi -# Valores por defecto -IMGPROG="partclone" -IMGCOMP="lzop" -IMGEXT="img" +# Valores por defecto en etc/engine.cfg +#IMGPROG="partclone" +#IMGCOMP="lzop" +#IMGEXT="img" +#IMGREDUCE="TRUE" echo "[1] Iniciando $0 $*" | tee -a $OGLOGSESSION $OGLOGFILE @@ -125,8 +129,13 @@ ogCheckFs $1 $2 || exit $(ogRaiseError $OG_ERR_PARTITION "ogCheckFs $1 $2" && ec echo " " > $OGLOGCOMMAND -echo "[30]: Reducir sistema de archivos." | tee -a $OGLOGSESSION $OGLOGFILE -ogReduceFs $1 $2 || exit $(ogRaiseError $OG_ERR_REDUCEFS "$1 $2"; echo $?) +if [ "$IMGREDUCE" == "TRUE" ] +then + echo "[30]: Reducir sistema de archivos." | tee -a $OGLOGSESSION $OGLOGFILE + ogReduceFs $1 $2 || exit $(ogRaiseError $OG_ERR_REDUCEFS "$1 $2"; echo $?) + TIMEAUX=$[SECONDS-TIME1] + echo " tiempo de reducción del sistema de archivos: $[TIMEAUX/60]m $[TIMEAUX%60]s" | tee -a $OGLOGSESSION $OGLOGFILE +fi echo " " > $OGLOGCOMMAND |