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 |
---|
[78b5dfe7] | 15 | #@version 1.0.1 - Configura el sector de la particion y el gestor de windows para iniciarse desde cualquier particion. |
---|
| 16 | #@author Antonio J. Doblas Viso. Universidad de Malaga. |
---|
| 17 | #@date 2011-05-20 |
---|
| 18 | |
---|
[7ee2d1a] | 19 | |
---|
| 20 | |
---|
| 21 | # Si el sistema de archivos no esta extendido. Realizar. |
---|
[f3850507] | 22 | PARTSIZE=$(ogGetPartitionSize $1 $2) |
---|
| 23 | FSSIZE=$(ogGetFsSize $1 $2) |
---|
| 24 | if [ $FSSIZE -lt $PARTSIZE ]; then |
---|
| 25 | echo "Extender sistema de archivos." |
---|
| 26 | ogExtendFs $1 $2 |
---|
| 27 | fi |
---|
| 28 | |
---|
[7ee2d1a] | 29 | #Si no existe particion activa, activar este sistema. |
---|
| 30 | FLAGACTIVE=$(ogGetPartitionActive $1) |
---|
| 31 | [ -z $FLAGACTIVE ] && ogSetPartitionActive $1 $2 |
---|
| 32 | |
---|
[f3850507] | 33 | # Cambiar nombre en sistemas Windows y quitar usuario de acceso por defecto. |
---|
| 34 | if [ "$(ogGetOsType $1 $2)" = "Windows" ]; then |
---|
| 35 | HOST=$(ogGetHostname) |
---|
| 36 | HOST=${HOST:-"pc"} |
---|
| 37 | echo " Cambiar nombre Windows a \"$HOST\" " |
---|
| 38 | ogSetWindowsName $1 $2 "$HOST" |
---|
| 39 | #ogSetWinlogonUser $1 $2 " " # Descomentar para cambiar usuario de inicio. |
---|
[78b5dfe7] | 40 | # Configurar el boot sector de la particion windows. |
---|
| 41 | ogFixBootSector $1 $2 |
---|
| 42 | # Configura el gestor de arranque de windows xp vista seven |
---|
| 43 | ogWindowsBootParameters $1 $2 |
---|
| 44 | # Registra en windows que la particion indicada es su nueva unidad c:\ |
---|
| 45 | ogWindowsRegisterPartition $1 $2 C $1 $2 |
---|
[f3850507] | 46 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.