summaryrefslogtreecommitdiffstats
path: root/client/shared/etc/preinit/mountrepo.sh
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2011-03-17 12:12:35 +0000
committerramon <ramongomez@us.es>2011-03-17 12:12:35 +0000
commitde87b1a74e877a2a8cc591352b4bd9acabfd838c (patch)
treec0ee6603eb7a19c909b31079f6657411229f21bb /client/shared/etc/preinit/mountrepo.sh
parent095d19373edeb95f6a1ed879278bddc5845da092 (diff)
Rama version1.0: Script para montar repositorio.
Refs #334. git-svn-id: https://opengnsys.es/svn/branches/version1.0@1548 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/shared/etc/preinit/mountrepo.sh')
-rwxr-xr-xclient/shared/etc/preinit/mountrepo.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/client/shared/etc/preinit/mountrepo.sh b/client/shared/etc/preinit/mountrepo.sh
new file mode 100755
index 00000000..bf81dfe5
--- /dev/null
+++ b/client/shared/etc/preinit/mountrepo.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+#/**
+#@file mountrepo.sh
+#@brief Script para montar el repositorio de datos remoto.
+#@warning License: GNU GPLv3+
+#@version 1.0
+#@author Ramon Gomez, ETSII Universidad de Sevilla
+#@date 2011-03-17
+#*/
+
+OGIMG=${OGIMG:-/opt/opengnsys/images}
+
+# TODO Revisar proceso de arranque para no montar 2 veces el repositorio.
+if [ $ogactiveadmin == "true" ]; then
+ export boot=admin
+ umount $OGIMG 2>/dev/null
+
+ 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,relatime,serverino,acl,username=opengnsys,password=og ;;
+ esac
+fi
+