diff options
Diffstat (limited to 'client/shared/etc/preinit/mountrepo.sh')
-rwxr-xr-x | client/shared/etc/preinit/mountrepo.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/client/shared/etc/preinit/mountrepo.sh b/client/shared/etc/preinit/mountrepo.sh index aa0b9886..5c20499a 100755 --- a/client/shared/etc/preinit/mountrepo.sh +++ b/client/shared/etc/preinit/mountrepo.sh @@ -9,6 +9,7 @@ #*/ OGIMG=${OGIMG:-/opt/opengnsys/images} +ROOTREPO=${ROOTREPO:-"$ROOTSERVER"} # TODO Revisar proceso de arranque para no montar 2 veces el repositorio. if [ $ogactiveadmin == "true" ]; then @@ -18,8 +19,12 @@ if [ $ogactiveadmin == "true" ]; then protocol=${potocol:-"smb"} printf "$MSG_MOUNTREPO\n" "$protocol" "$boot" case "$protocol" in - nfs) mount.nfs ${ROOTSERVER}:$OGIMG $OGIMG -o rw,nolock ;; - smb) mount.cifs //${ROOTSERVER}/ogimages $OGIMG -o rw,serverino,acl,username=opengnsys,password=og ;; + nfs) mount.nfs ${ROOTREPO}:$OGIMG $OGIMG -o rw,nolock ;; + smb) PASS=$(grep "^[ ]*\(export \)\?OPTIONS=" /scripts/ogfunctions 2>&1 | \ + sed 's/\(.*\)pass=\(\w*\)\(.*\)/\2/') + PASS=${PASS:-"og"} + mount.cifs //${ROOTREPO}/ogimages $OGIMG -o rw,serverino,acl,username=opengnsys,password=$PASS + ;; esac fi |