source: client/shared/etc/preinit/mountrepo.sh @ 814c308

Last change on this file since 814c308 was 91aaf03, checked in by ramon <ramongomez@…>, 13 years ago

Versión 1.0.3, #499: Integrar versión 1.0.3 en rama principal.

git-svn-id: https://opengnsys.es/svn/trunk@2695 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100755
File size: 913 bytes
Line 
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
11OGIMG=${OGIMG:-/opt/opengnsys/images}
12ROOTREPO=${ROOTREPO:-"$ROOTSERVER"}
13
14# TODO Revisar proceso de arranque para no montar 2 veces el repositorio.
15if [ $ogactiveadmin == "true" ]; then
16        export boot=admin       # ATENCIÓN: siempre en modo "admin".
17        umount $OGIMG 2>/dev/null
18
19        protocol=${ogprotocol:-"smb"}
20        printf "$MSG_MOUNTREPO\n" "$protocol" "$boot"
21        case "$ogprotocol" in
22                nfs)    mount.nfs ${ROOTREPO}:$OGIMG $OGIMG -o rw,nolock ;;
23                smb)    PASS=$(grep "^[         ]*\(export \)\?OPTIONS=" /scripts/ogfunctions 2>&1 | \
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                        ;;
28        esac
29fi
30
Note: See TracBrowser for help on using the repository browser.