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 | # Scirpt de ejemplo para arancar un sistema operativo instalado. |
---|
3 | # (puede usarse como base para el programa de arranque usado por OpenGNSys Admin). |
---|
4 | |
---|
5 | PROG="$(basename $0)" |
---|
6 | if [ $# -ne 2 ]; then |
---|
7 | ogRaiseError $OG_ERR_FORMAT "Formato: $PROG ndisco nparticion" |
---|
8 | exit $? |
---|
9 | fi |
---|
10 | |
---|
11 | # Procesos previos. |
---|
12 | PART=$(ogDiskToDev $1 $2) | exit $? |
---|
13 | |
---|
14 | # Arrancar. |
---|
15 | ogEcho info "$PROG: Desmontar todos los sistemas operativos del disco." |
---|
16 | ogUnmountAll $1 | exit $? |
---|
17 | if [ "$(ogGetOsType $1 $2)" = "Windows" ]; then |
---|
18 | ogEcho info "$PROG: Activar partición de Windows $PART." |
---|
19 | ogSetPartitionActive $1 $2 |
---|
20 | ogEcho info "$PROG: Comprobar sistema de archivos." |
---|
21 | ogCheckFs $1 $2 |
---|
22 | fi |
---|
23 | ogEcho info "$PROG: Arrancar sistema operativo." |
---|
24 | ogBoot $1 $2 |
---|
25 | |
---|
Note: See
TracBrowser
for help on using the repository browser.