diff options
author | ramon <ramongomez@us.es> | 2017-01-26 13:21:30 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2017-01-26 13:21:30 +0000 |
commit | 88f66f2b178f066ff6fe33d4b45436d404e4e681 (patch) | |
tree | 02f70cc47a34561ffda9a52a2d7e4e6f4839cd45 /client/boot-tools | |
parent | a79df90a0726dc876d1622784126f346057f5eeb (diff) |
#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
Diffstat (limited to 'client/boot-tools')
-rw-r--r-- | client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions | 8 | ||||
-rwxr-xr-x | client/boot-tools/includes/etc/initramfs-tools/scripts/oginit | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions b/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions index 2d5f0b54..6abb1207 100644 --- a/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions +++ b/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions @@ -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 diff --git a/client/boot-tools/includes/etc/initramfs-tools/scripts/oginit b/client/boot-tools/includes/etc/initramfs-tools/scripts/oginit index a8879673..2c88fdc8 100755 --- a/client/boot-tools/includes/etc/initramfs-tools/scripts/oginit +++ b/client/boot-tools/includes/etc/initramfs-tools/scripts/oginit @@ -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 |