918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Rev | Line | |
---|
[3ec149c] | 1 | #!/bin/bash |
---|
| 2 | |
---|
[f6c1d2b] | 3 | #___________________________________________________ |
---|
[3ec149c] | 4 | # |
---|
| 5 | # PARAMETROS RECIBIDOS DESDE EL CLIENTE: |
---|
[f6c1d2b] | 6 | # $1 Número de disco |
---|
| 7 | # $2 Número de particion |
---|
| 8 | # $3 Nombre canónico de la imagen (sin extensión) |
---|
| 9 | # $4 Dirección del repositorio (REPO, por defecto) |
---|
| 10 | #___________________________________________________ |
---|
[914d834] | 11 | |
---|
[f6c1d2b] | 12 | # Registro de ejecución |
---|
| 13 | echo $* >> $OGLOGFILE |
---|
[914d834] | 14 | |
---|
[f6c1d2b] | 15 | # Solo ejecutable por OpenGnSys Client. |
---|
| 16 | PATH=$PATH:$(dirname $0) |
---|
| 17 | PROG=$(basename $0) |
---|
| 18 | CALLER=$(ogGetCaller) |
---|
| 19 | if [ "$CALLER" != "ogAdmClient" ]; then |
---|
| 20 | ogRaiseError $OG_ERR_NOTEXEC "$CALLER -> $PROG" |
---|
| 21 | exit $? |
---|
[914d834] | 22 | fi |
---|
| 23 | |
---|
[f6c1d2b] | 24 | # Valor por defecto para el repositorio. |
---|
[16ac86e] | 25 | REPO=${4:-"REPO"} |
---|
| 26 | [ "$REPO" == "$(ogGetRepoIp)" ] && REPO="REPO" |
---|
| 27 | [ "$REPO" == "$(ogGetIpAddress)" ] && REPO="CACHE" |
---|
[f6c1d2b] | 28 | |
---|
| 29 | # Si cleinte no está en modo "admin"; activar repositorio para escritura, |
---|
| 30 | # crear imagen y activar para lectura. |
---|
| 31 | [ "$boot" != "admin" ] && CambiarAcceso admin |
---|
| 32 | if [ -f createImage$ogengine ]; then |
---|
| 33 | createImage$ogengine "$1" "$2" "$REPO" "$3" &>> $OGLOGFILE |
---|
[d9d1720] | 34 | else |
---|
[f6c1d2b] | 35 | createImage "$1" "$2" "$REPO" "$3" &>> $OGLOGFILE |
---|
[d9d1720] | 36 | fi |
---|
[f6c1d2b] | 37 | RETVAL=$? |
---|
| 38 | [ "$boot" != "admin" ] && CambiarAcceso user |
---|
| 39 | exit $RETVAL |
---|
[d9d1720] | 40 | |
---|
Note: See
TracBrowser
for help on using the repository browser.