summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2010-11-16 18:29:11 +0000
committerramon <ramongomez@us.es>2010-11-16 18:29:11 +0000
commit7510561000e3c0b131cf3c6708764a83919013b3 (patch)
tree61d25f545fe0b4ef5d581a11e1c2e81779f0754e
parentc4321ae190194dd7dd7161dd9db190fa785c0c9e (diff)
Corregir errata de instalador añadida en r1341.
Función {{{ogCreatePartitions}}} desmonta caché local para evitar errores de reparticionado. git-svn-id: https://opengnsys.es/svn/trunk@1348 a21b9725-9963-47de-94b9-378ad31fedc9
-rwxr-xr-xclient/engine/Disk.lib8
-rwxr-xr-xinstaller/opengnsys_installer.sh2
2 files changed, 6 insertions, 4 deletions
diff --git a/client/engine/Disk.lib b/client/engine/Disk.lib
index 5a1ad1be..ebd96815 100755
--- a/client/engine/Disk.lib
+++ b/client/engine/Disk.lib
@@ -43,10 +43,8 @@ fi
# Error si no se reciben menos de 2 parámetros.
[ $# -ge 2 ] || ogRaiseError $OG_ERR_FORMAT || return $?
-# Desmontar todos los sistemas de archivos del disco.
-DISK=$(ogDiskToDev "$1") || return $?
-ogUnmountAll $1
# Nº total de sectores, para evitar desbordamiento (evitar redondeo).
+DISK=$(ogDiskToDev "$1") || return $?
SECTORS=$(awk -v D=${DISK#/dev/} '{if ($4==D) {print $3*2}}' /proc/partitions)
CYLS=$(sfdisk -g $DISK | cut -f2 -d" ")
SECTORS=$[SECTORS/CYLS*CYLS-1]
@@ -118,6 +116,10 @@ if [ $PART = 5 -a -n "$EXTSTART" ]; then
echo "${DISK}5 : start=$EXTSTART, size=$EXTSIZE, Id=0" >>$tmpsfdisk
fi
+# Desmontar los sistemas de archivos del disco antes de realizar las operaciones.
+ogUnmountAll $1
+[ -n "$CACHESIZE" ] && ogUnmountCache
+
# Si la tabla de particiones no es valida, volver a generarla.
[ $(parted -s $DISK print >/dev/null) ] || fdisk $DISK <<< "w"
# Definir particiones y notificar al kernel.
diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh
index 5319baf6..4107bc5b 100755
--- a/installer/opengnsys_installer.sh
+++ b/installer/opengnsys_installer.sh
@@ -41,7 +41,7 @@ LOG_FILE=/tmp/opengnsys_installation.log
DEPENDENCIES=( subversion apache2 php5 libapache2-mod-php5 mysql-server php5-mysql nfs-kernel-server dhcp3-server udpcast bittorrent tftp-hpa tftpd-hpa syslinux openbsd-inetd update-inetd build-essential libmysqlclient15-dev wget doxygen graphviz bittornado ctorrent )
# Base de datos
-OPENGNSYS_DB_CREATION_FILE=opengnsys/admin/Database/$OPENGNSYS_DATABASE.sql
+OPENGNSYS_DB_CREATION_FILE=opengnsys/admin/Database/ogAdmBD.sql
#####################################################################