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 | |
---|
[f3850507] | 1 | #!/bin/bash |
---|
| 2 | |
---|
[7ee2d1a] | 3 | #/** |
---|
| 4 | # configureOS |
---|
| 5 | #@brief Scirpt de ejemplo para realizar la configuracion del sistema operativo restaurado. |
---|
| 6 | #@brief (puede usarse como base para el programa de creación de imágenes usado por OpenGnSys Admin). |
---|
| 7 | #@param 1 disco |
---|
| 8 | #@param 2 particion |
---|
| 9 | #@return |
---|
| 10 | #@TODO comprobar que el tipo de particion corresponde con el sistema de archivos. |
---|
| 11 | #@exception OG_ERR_FORMAT # 1 formato incorrecto. |
---|
| 12 | #@version 1.0.1 - Integracion cambio de nombre, extender fs, chequear particion activa |
---|
| 13 | #@author |
---|
| 14 | #@date 2011-05-11 |
---|
| 15 | |
---|
| 16 | |
---|
| 17 | # Si el sistema de archivos no esta extendido. Realizar. |
---|
[f3850507] | 18 | PARTSIZE=$(ogGetPartitionSize $1 $2) |
---|
| 19 | FSSIZE=$(ogGetFsSize $1 $2) |
---|
| 20 | if [ $FSSIZE -lt $PARTSIZE ]; then |
---|
| 21 | echo "Extender sistema de archivos." |
---|
| 22 | ogExtendFs $1 $2 |
---|
| 23 | fi |
---|
| 24 | |
---|
[7ee2d1a] | 25 | #Si no existe particion activa, activar este sistema. |
---|
| 26 | FLAGACTIVE=$(ogGetPartitionActive $1) |
---|
| 27 | [ -z $FLAGACTIVE ] && ogSetPartitionActive $1 $2 |
---|
| 28 | |
---|
[f3850507] | 29 | # Cambiar nombre en sistemas Windows y quitar usuario de acceso por defecto. |
---|
| 30 | if [ "$(ogGetOsType $1 $2)" = "Windows" ]; then |
---|
| 31 | HOST=$(ogGetHostname) |
---|
| 32 | HOST=${HOST:-"pc"} |
---|
| 33 | echo " Cambiar nombre Windows a \"$HOST\" " |
---|
| 34 | ogSetWindowsName $1 $2 "$HOST" |
---|
| 35 | #ogSetWinlogonUser $1 $2 " " # Descomentar para cambiar usuario de inicio. |
---|
| 36 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.