summaryrefslogtreecommitdiffstats
path: root/client/engine/Boot.lib
diff options
context:
space:
mode:
authoririna <irinagomez@us.es>2015-10-01 11:18:02 +0000
committeririna <irinagomez@us.es>2015-10-01 11:18:02 +0000
commit28ffb59d75d150ef503a1f2fe414b1e019e137f0 (patch)
treeaf49f07d04312160c09214a48aa3a6a805f72679 /client/engine/Boot.lib
parent0e24b1658df3564c6f4239f268faff9769859139 (diff)
#484 arranque dual: mejora ogLinuxBootParameter y ogGrubAddOgclient
git-svn-id: https://opengnsys.es/svn/branches/version1.1@4689 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/engine/Boot.lib')
-rwxr-xr-xclient/engine/Boot.lib10
1 files changed, 5 insertions, 5 deletions
diff --git a/client/engine/Boot.lib b/client/engine/Boot.lib
index 1d365022..0360ca2f 100755
--- a/client/engine/Boot.lib
+++ b/client/engine/Boot.lib
@@ -201,7 +201,7 @@ MNTDIR=$(ogMount $1 $2) || return $?
# Fichero de configuración de GRUB.
CONFDIR=$MNTDIR # Sistema de archivos de arranque (/boot).
[ -d $MNTDIR/boot ] && CONFDIR=$MNTDIR/boot # Sist. archivos raíz con directorio boot.
-for f in $MNTDIR/{,grubPARTITION/}{,boot/}{grub{,2},{,efi/}EFI/*}/{menu.lst,grub.cfg,grub.cfg.backup.og}; do
+for f in $MNTDIR/{,{,boot/}grubPARTITION/}{,boot/}{grub{,2},{,efi/}EFI/*}/{menu.lst,grub.cfg.backupu.og,grub.cfg}
[ -r $f ] && CONFFILE=$f
done
[ -n "$CONFFILE" ] || ogRaiseError $OG_ERR_NOTFOUND "grub.cfg" || return $?
@@ -1010,7 +1010,7 @@ rm -f ${MNTDIR}/etc/udev/rules.d/70-persistent-net.rules
# /// FIXME: Solo para el grub instalado en MBR por Opengnsys, ampliar para más casos.
#*/
-ogGrubAddOgclient () {
+function ogGrubAddOgclient () {
local TIMEOUT DIRMOUNT GRUBGFC PARTTABLETYPE NUMDISK NUMPART KERNEL STATUS NUMLINE MENUENTRY
# Si se solicita, mostrar ayuda.
@@ -1036,8 +1036,8 @@ ogGrubAddOgclient () {
# Error si no existe archivo del grub
[ -r $GRUBGFC ] || return $(ogRaiseError log session $OG_ERR_NOTFOUND "$GRUBGFC" 1>&2; echo $?)
- # Si existe la entrada de opengnsys nos salimos.
- grep "menuentry Opengnsys" $GRUBGFC &>/dev/null && return 0
+ # Si existe la entrada de opengnsys, se borra
+ grep -q "menuentry Opengnsys" $GRUBGFC && sed -ie "/menuentry Opengnsys/,+6d" $GRUBGFC
# Tipo de tabla de particiones
PARTTABLETYPE=$(ogGetPartitionTableType $1 | tr [:upper:] [:lower:])
@@ -1046,7 +1046,7 @@ ogGrubAddOgclient () {
read NUMDISK NUMPART <<< $(ogFindCache)
let NUMDISK=$NUMDISK-1
# kernel y sus opciones. Pasamos a modo usuario
- KERNEL="/boot/ogvmlinuz $(sed -e s/^.*linuz//g -e s/ogactiveadmin=true/ogactiveadmin=false/g /proc/cmdline)"
+ KERNEL="/boot/ogvmlinuz $(sed -e s/^.*linuz//g -e s/ogactiveadmin=[a-z]*//g /proc/cmdline)"
# Configuracion offline si existe parametro
echo "$@" |grep offline &>/dev/null && STATUS=offline