Version 1.0: Creación de imágenes desde la consola en cliente no administrador.

* Corrección en funciones {{{ogGetRepoIp}}} y {{{ogGetServerIp}}}.
 * Corrección de errata en script de interfaz web para cambiar modo de montaje del repositorio.
 * Modificación de permisos de instalación.
Modificado #291.

git-svn-id: https://opengnsys.es/svn/branches/version1.0@1642 a21b9725-9963-47de-94b9-378ad31fedc9
remotes/github/debian-pkg
ramon 2011-03-28 12:24:04 +00:00
parent a7125bfb2c
commit 16919efaa7
3 changed files with 19 additions and 24 deletions

View File

@ -26,10 +26,10 @@ if ogIsRepoLocked; then
fi
# Comprobar protocolo y modo de acceso.
protocol=${protocol:-"smb"}
case "$protocol" in
PROTO=${ogprotocol:-"smb"}
case "$PROTO" in
nfs|smb) ;;
*) ogRaiseError $OG_ERR_FORMAT "protocolo desconocido $protocol"
*) ogRaiseError $OG_ERR_FORMAT "protocolo desconocido $PROTO"
exit $? ;;
esac
case "$1" in
@ -42,8 +42,8 @@ esac
# Desmontar repositorio y volver a montarlo con el modo adecuado.
umount $OGIMG
ogEcho info "$PROG: Montar repositorio $REPO por $protocol en modo $1"
case "$protocol" in
nfs) mount -t nfs -o $MODE $REPOIP:$OGIMG $OGIMG ;;
smb) mount -t cifs //${ROOTSERVER}/ogimages $OGIMG -o $MODE,serverino,acl,username=opengnsys,password=og ;;
case "$PROTO" in
nfs) mount -t nfs $REPOIP:$OGIMG $OGIMG -o $MODE ;;
smb) mount -t cifs //$REPOIP/ogimages $OGIMG -o $MODE,serverino,acl,username=opengnsys,password=og ;;
esac

View File

@ -112,14 +112,12 @@ echo ${MAC%% *}
function ogGetRepoIp ()
{
# Obtener direcciones IP, segun el protocolo de montaje
case $ogprotocol in
nfs)
[ -n "$OGIMG" ] && mount | grep " $OGIMG .* nfs " | cut -f1 -d:
;;
smb)
[ -n "$OGIMG" ] && mount | grep ogimages | awk -F"addr=" '{print $2}' | cut -f1 -d","
;;
esac
if [ -n "$OGIMG" ]; then
case "$ogprotocol" in
nfs) mount | grep " on $OGIMG " | cut -f1 -d: ;;
smb) mount | grep " on $OGIMG " | cut -f3 -d/ ;;
esac
fi
}
@ -138,14 +136,11 @@ esac
function ogGetServerIp ()
{
# Obtener direcciones IP.
case $ogprotocol in
nfs)
[ -n "$OPENGNSYS" ] && mount | grep " $OPENGNSYS .* nfs " | cut -f1 -d:
;;
smb)
[ -n "$OGIMG" ] && mount | grep ogclient | awk -F"addr=" '{print $2}' | cut -f1 -d","
;;
esac
if [ -n "$PENGNSYS" ]; then
case "$ogprotocol" in
nfs) mount | grep " on $OPENGNSYS " | cut -f1 -d: ;;
smb) mount | grep " on $OPENGNSYS " | cut -f3 -d/ ;;
esac
fi
}

View File

@ -971,7 +971,7 @@ function copyInterfaceAdm ()
echoAndLog "${FUNCNAME}(): error while copying Administration Interface Folder"
hayErrores=1
fi
chown root:root $INSTALL_TARGET/client/interfaceAdm/CambiarAcceso
chown $OPENGNSYS_CLIENT_USER $INSTALL_TARGET/client/interfaceAdm/CambiarAcceso
chmod 700 $INSTALL_TARGET/client/interfaceAdm/CambiarAcceso
return $hayErrores