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 | |
---|
[de87b1a] | 1 | #!/bin/bash |
---|
| 2 | #/** |
---|
| 3 | #@file mountrepo.sh |
---|
| 4 | #@brief Script para montar el repositorio de datos remoto. |
---|
| 5 | #@warning License: GNU GPLv3+ |
---|
| 6 | #@version 1.0 |
---|
| 7 | #@author Ramon Gomez, ETSII Universidad de Sevilla |
---|
| 8 | #@date 2011-03-17 |
---|
| 9 | #*/ |
---|
| 10 | |
---|
| 11 | OGIMG=${OGIMG:-/opt/opengnsys/images} |
---|
[33100f8] | 12 | ROOTREPO=${ROOTREPO:-"$ROOTSERVER"} |
---|
[de87b1a] | 13 | |
---|
| 14 | # TODO Revisar proceso de arranque para no montar 2 veces el repositorio. |
---|
| 15 | if [ $ogactiveadmin == "true" ]; then |
---|
[c39fac3] | 16 | export boot=admin # ATENCIÓN: siempre en modo "admin". |
---|
[de87b1a] | 17 | umount $OGIMG 2>/dev/null |
---|
| 18 | |
---|
[522c19d] | 19 | protocol=${ogprotocol:-"smb"} |
---|
[de87b1a] | 20 | printf "$MSG_MOUNTREPO\n" "$protocol" "$boot" |
---|
[cca95a3] | 21 | case "$ogprotocol" in |
---|
[33100f8] | 22 | nfs) mount.nfs ${ROOTREPO}:$OGIMG $OGIMG -o rw,nolock ;; |
---|
[300fbd9] | 23 | smb) PASS=$(grep "^[ ]*\(export \)\?OPTIONS=" /scripts/ogfunctions 2>&1 | \ |
---|
[1895428] | 24 | sed 's/\(.*\)pass=\(\w*\)\(.*\)/\2/') |
---|
| 25 | PASS=${PASS:-"og"} |
---|
| 26 | mount.cifs //${ROOTREPO}/ogimages $OGIMG -o rw,serverino,acl,username=opengnsys,password=$PASS |
---|
| 27 | ;; |
---|
[de87b1a] | 28 | esac |
---|
| 29 | fi |
---|
| 30 | |
---|
Note: See
TracBrowser
for help on using the repository browser.