source: client/shared/etc/preinit/mountrepo.sh @ c3c7cb3

opengnsys-1.0.2
Last change on this file since c3c7cb3 was c3c7cb3, checked in by ramon <ramongomez@…>, 13 years ago

Congelar versión 1.0.2 en tags/opengnsys-1.0.2 (modifica #446).

git-svn-id: https://opengnsys.es/svn/tags/opengnsys-1.0.2@2405 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100755
File size: 870 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
17        umount $OGIMG 2>/dev/null
18
19        protocol=${potocol:-"smb"}
20        printf "$MSG_MOUNTREPO\n" "$protocol" "$boot"
21        case "$protocol" 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.