#841 Fixes bug in partitioning wizard when configure MBR: ogGetBootMbr function is created for detect MBR content and used in wizard.
parent
e521fb869b
commit
9fe0fe30b7
|
@ -298,7 +298,7 @@ if [ $EVAL -eq 0 ]; then \n \
|
|||
ogSetPartitionActive "+n_disk+" 1 \n \
|
||||
ogEcho log session \"[90] $MSG_HELP_ogListPartitions "+n_disk+"\"\n \
|
||||
ogUpdatePartitionTable "+n_disk+" \n \
|
||||
ms-sys /dev/sda | grep unknow && ms-sys /dev/sda \n \
|
||||
ogGetBootMbr "+n_disk+" | grep unknow && ogBootMbrGeneric "+n_disk+" \n \
|
||||
ogExecAndLog command session log ogListPartitions "+n_disk+" \n\
|
||||
"+ swapCode +"\
|
||||
if ogFindCache &>/dev/null; then \n\
|
||||
|
@ -403,7 +403,7 @@ if [ $EVAL -eq 0 ]; then \n \
|
|||
ogSetPartitionActive "+n_disk+" 1 \n \
|
||||
ogEcho log session \"[90] $MSG_HELP_ogListPartitions "+n_disk+"\"\n \
|
||||
ogUpdatePartitionTable "+n_disk+" \n \
|
||||
ms-sys /dev/sda | grep unknow && ms-sys /dev/sda \n \
|
||||
ogGetBootMbr "+n_disk+" | grep -e unknow -e zeroed && ogBootMbrGeneric "+n_disk+" \n \
|
||||
ogExecAndLog command session log ogListPartitions "+n_disk+" \n \
|
||||
if ogFindCache &>/dev/null; then \n\
|
||||
ogMountCache || ogFormatCache \n\
|
||||
|
|
|
@ -505,6 +505,36 @@ rm -f $FILE
|
|||
}
|
||||
|
||||
|
||||
#/**
|
||||
# ogGetBootMbr int_ndisk
|
||||
#@brief Obtiene el contenido del sector de arranque de un disco.
|
||||
#@param int_ndisk nº de orden del disco
|
||||
#@return str_MBR Descripción del contenido del MBR.
|
||||
#@exception OG_ERR_FORMAT Formato incorrecto.
|
||||
#@exception OG_ERR_NOTFOUND Dispositivo de disco no encontrado.
|
||||
#@version 1.1.1b - Primera versión
|
||||
#@author Irina Gómez (US). Propuesto por Antonio J. Doblas Viso (UMA)
|
||||
#@date 2020-04-05
|
||||
#*/ ##
|
||||
function ogGetBootMbr ()
|
||||
{
|
||||
# Variables locales.
|
||||
local DISK
|
||||
|
||||
# Si se solicita, mostrar ayuda.
|
||||
if [ "$*" == "help" ]; then
|
||||
ogHelp "$FUNCNAME" "$FUNCNAME int_ndisk " \
|
||||
"$FUNCNAME 1"
|
||||
return
|
||||
fi
|
||||
|
||||
# Error si no se recibe 1 parámetro.
|
||||
[ $# == 1 ] || ogRaiseError $OG_ERR_FORMAT "$FUNCNAME int_ndisk" || return $?
|
||||
|
||||
DISK="$(ogDiskToDev $1)" || return $?
|
||||
|
||||
ms-sys -f $DISK
|
||||
}
|
||||
|
||||
#/**
|
||||
# ogWindowsBootParameters int_ndisk int_parition
|
||||
|
|
Loading…
Reference in New Issue