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 | |
---|
[f5432db7] | 1 | #!/bin/bash |
---|
[6963f42] | 2 | # Script de ejemplo para arancar un sistema operativo instalado. |
---|
[f5432db7] | 3 | # (puede usarse como base para el programa de arranque usado por OpenGNSys Admin). |
---|
| 4 | |
---|
| 5 | PROG="$(basename $0)" |
---|
[5359439] | 6 | if [ $# -lt 2 -o $# -gt 3 ]; then |
---|
[dc4eac6] | 7 | ogRaiseError $OG_ERR_FORMAT "Formato: $PROG ndisco nfilesys [str_kernel str_initrd str_kernelparams]" |
---|
[f5432db7] | 8 | exit $? |
---|
| 9 | fi |
---|
| 10 | |
---|
[4dd4e42] | 11 | # Comprobar errores. |
---|
[c7d9af7] | 12 | PART=$(ogDiskToDev "$1" "$2") || exit $? |
---|
[6963f42] | 13 | ogMount $1 $2 &>/dev/null || exit $? |
---|
[4dd4e42] | 14 | |
---|
| 15 | echo "[0] Inicio del proceso de arranque." |
---|
[6963f42] | 16 | |
---|
| 17 | if which bootOsCustom &>/dev/null; then |
---|
[c436360] | 18 | echo "[10] Configuración personalizada del inicio." |
---|
[6963f42] | 19 | bootOsCustom $@ |
---|
| 20 | fi |
---|
| 21 | |
---|
| 22 | echo "[70] Desmontar todos los sistemas de archivos." |
---|
| 23 | sync |
---|
| 24 | for (( i=1; i <= $(ogDiskToDev | wc -w); i++ )); do |
---|
| 25 | ogUnmountAll $i &>/dev/null |
---|
| 26 | done |
---|
| 27 | echo "[80] Desmontar cache local." |
---|
[bfeb89a] | 28 | ogUnmountCache |
---|
[180a07dd] | 29 | echo "[90] Arrancar sistema operativo." |
---|
[6963f42] | 30 | ogBoot "$@" |
---|
Note: See
TracBrowser
for help on using the repository browser.