close
Warning:
Failed to sync with repository "ogBrowser-Git": (1366, "Incorrect string value: '\\xF0\\x9F\\x93\\xA6 I...' for column 'message' at row 1"); repository information may be out of date. Look in the Trac log for more information including mitigation strategies.
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
| Line | |
|---|
| 1 | #!/bin/bash |
|---|
| 2 | |
|---|
| 3 | #___________________________________________________ |
|---|
| 4 | # |
|---|
| 5 | # PARAMETROS RECIBIDOS DESDE EL CLIENTE: |
|---|
| 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 | #___________________________________________________ |
|---|
| 11 | |
|---|
| 12 | # Registro de ejecución |
|---|
| 13 | echo $* >> $OGLOGFILE |
|---|
| 14 | |
|---|
| 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 $? |
|---|
| 22 | fi |
|---|
| 23 | |
|---|
| 24 | # Valor por defecto para el repositorio. |
|---|
| 25 | REPO=${4:-"REPO"} |
|---|
| 26 | [ "$REPO" == "$(ogGetRepoIp)" ] && REPO="REPO" |
|---|
| 27 | [ "$REPO" == "$(ogGetIpAddress)" ] && REPO="CACHE" |
|---|
| 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 |
|---|
| 34 | else |
|---|
| 35 | createImage "$1" "$2" "$REPO" "$3" &>> $OGLOGFILE |
|---|
| 36 | fi |
|---|
| 37 | RETVAL=$? |
|---|
| 38 | [ "$boot" != "admin" ] && CambiarAcceso user |
|---|
| 39 | exit $RETVAL |
|---|
| 40 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.