#591 ogCleanLinuxDevices() en Boot.lib limpia dispositivos asociados a la maquina origen del sistema de archivos imagen. relacionado con #484
git-svn-id: https://opengnsys.es/svn/branches/version1.0@3693 a21b9725-9963-47de-94b9-378ad31fedc9remotes/github/debian-pkg
parent
764f50ef62
commit
df814dd0a9
|
@ -897,3 +897,45 @@ fi
|
|||
|
||||
}
|
||||
|
||||
|
||||
###
|
||||
#En pruebas
|
||||
##
|
||||
#/**
|
||||
# ogCleanLinuxDevices int_ndisk int_npartition
|
||||
#@brief Limpia los dispositivos del equipo de referencia. Interfaz de red ...
|
||||
#@param int_ndisk nº de orden del disco
|
||||
#@param int_npartition nº de orden de la partición
|
||||
#@return (nada)
|
||||
#@exception OG_ERR_FORMAT Formato incorrecto.
|
||||
#@exception OG_ERR_NOTFOUND Disco o particion no corresponden con un dispositivo.
|
||||
#@exception OG_ERR_PARTITION Tipo de partición desconocido o no se puede montar.
|
||||
#@version .
|
||||
#@author
|
||||
#@date
|
||||
#*/ ##
|
||||
function ogCleanLinuxDevices ()
|
||||
{
|
||||
# Variables locales.
|
||||
local PART MNTDIR NAME
|
||||
|
||||
# Si se solicita, mostrar ayuda.
|
||||
if [ "$*" == "help" ]; then
|
||||
ogHelp "$FUNCNAME" "$FUNCNAME int_ndisk int_npartition " \
|
||||
"$FUNCNAME 1 1 "
|
||||
return
|
||||
fi
|
||||
# Error si no se reciben 2 parámetros.
|
||||
[ $# == 2 ] || ogRaiseError $OG_ERR_FORMAT || return $?
|
||||
|
||||
# Montar el sistema de archivos.
|
||||
MNTDIR=$(ogMount $1 $2) 2>/dev/null
|
||||
[ -z "$MNTDIR" ] && ogRaiseError OG_ERR_PARTITION "$1, $2" && return $?
|
||||
|
||||
ETC=$(ogGetPath $1 $2 /etc)
|
||||
|
||||
# Clean old network id in udev configuration
|
||||
UDEVNET="${ETC}/udev/rules.d/70-persistent-net.rules"
|
||||
[ -f $UDEVNET ] && echo " " > $UDEVNET
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue