#768: ogLive usa subdirectorio por defecto si no encuentra el solicitado en la variable del kernel {{{oglivedir}}}.

git-svn-id: https://opengnsys.es/svn/branches/version1.1@5163 a21b9725-9963-47de-94b9-378ad31fedc9
remotes/github/master
ramon 2017-01-26 13:21:30 +00:00
parent aad89c0f6e
commit 71517ae97c
2 changed files with 7 additions and 3 deletions

View File

@ -124,8 +124,8 @@ ogExportVarEnvironment ()
[ "$ogunit" != "" ] && OGUNIT="/$ogunit"
# OPTIONS Para samba y local (a nfs no le afecta)
export OPTIONS=" -o user=opengnsys,pass=og"
export OGLIVEDIR="${oglivedir:-ogclient}" && echo "OGLIVEDIR=$OGLIVEDIR" >> $CFGINITRD
unset oglivedir
DEFOGLIVE="ogclient"
export OGLIVEDIR="${oglivedir:-$DEFOGLIVE}" && echo "OGLIVEDIR=$OGLIVEDIR" >> $CFGINITRD
case "$OGPROTOCOL" in
nfs|NFS)
export SRCOGLIVE="/var/lib/tftpboot" && echo "SRCOGLIVE=$SRCOGLIVE" >> $CFGINITRD
@ -509,6 +509,10 @@ ogConnectOgLive ()
ogMergeLive()
{
#Si existe en el punto de acceso del del oglive el fichero ogclient.sqfs
if [ ! -d $DSTOGLIVE/$OGLIVEDIR ]; then
echo "Usando ogLive por defecto."
export OGLIVEDIR=$DEFOGLIVE
fi
if [ -f $DSTOGLIVE/$OGLIVEDIR/ogclient.sqfs ]
then
cat /proc/mounts > /tmp/mtab.preunion

View File

@ -110,7 +110,7 @@ mountroot ()
[ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before connect with client dir SHARE -engine,scripts,interface, -share- on $OGSERVERSHARE : y/N "
[ $? == 0 ] && sh || echo " "
ogConnect $OGSERVERSHARE $OGPROTOCOL $SRCOGSHARE $DSTOGSHARE
if [ $? -ne 0 -a "$SRCOGSHARE" != "$DEFOGSHARE"]; then
if [ $? -ne 0 -a "$SRCOGSHARE" != "$DEFOGSHARE" ]; then
ogConnect $OGSERVERSHARE $OGPROTOCOL $DEFOGSHARE $DSTOGSHARE && SRCOGSHARE=$DEFOGSHARE
fi
unset DEFOGSHARE