summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2011-01-26 15:05:03 +0000
committerramon <ramongomez@us.es>2011-01-26 15:05:03 +0000
commit8908baaa669e3a8b236b56461a8ef955527a571b (patch)
tree68144c68ffe0eafae3a886ebad2b97120d132c7c
parentf56f8b299c6f71ba66f07381eb347fce7f6347d1 (diff)
Cliente Interd soporta descarga de repositorio de actualización.
git-svn-id: https://opengnsys.es/svn/trunk@1400 a21b9725-9963-47de-94b9-378ad31fedc9
-rwxr-xr-xclient/boot/initrd-generator37
-rw-r--r--client/boot/udeblist-lucid.conf14
-rwxr-xr-xclient/boot/upgrade-clients-udeb.sh4
3 files changed, 26 insertions, 29 deletions
diff --git a/client/boot/initrd-generator b/client/boot/initrd-generator
index 0d0b4031..d63b9866 100755
--- a/client/boot/initrd-generator
+++ b/client/boot/initrd-generator
@@ -7,7 +7,7 @@ ARCH=$(arch) # Arquitectura del sistema: i386 (32 bits), amd64 (64 bits).
ARCH=${ARCH:-"$(uname -m)"} # Corrección para Ubuntu Jaunty.
ARCH=${ARCH/i[4-6]86/i386}
ARCH=${ARCH/x86_64/amd64}
-URL=http://archive.ubuntu.com/ubuntu/dists/$DIST/main/installer-$ARCH/current/images/netboot/ubuntu-installer/$ARCH
+URL=http://archive.ubuntu.com/ubuntu/dists/$DIST-updates/main/installer-$ARCH/current/images/netboot/ubuntu-installer/$ARCH
if [ "$TMP" = "" ] ; then TMP=/tmp ; fi
TMPINITRD=$TMP/initrd
NEWROOT=$TMPINITRD/newroot
@@ -34,7 +34,7 @@ function parsearParametros
return -1
else
DIST=$1
- URL=http://archive.ubuntu.com/ubuntu/dists/$DIST/main/installer-$ARCH/current/images/netboot/ubuntu-installer/$ARCH
+ URL=http://archive.ubuntu.com/ubuntu/dists/$DIST-updates/main/installer-$ARCH/current/images/netboot/ubuntu-installer/$ARCH
shift
fi
;;
@@ -65,27 +65,20 @@ function descargar
mkdir -p $TMPINITRD
cd $TMPINITRD
- # Borramos el initrd anterior si existe
- if [ -f initrd.gz ]; then rm initrd.gz; fi
-
- # Nos lo descargamos
- wget $URL/initrd.gz
- if [ $? = 1 ] ; then
- echo Error no se ha podido descarga el initrd.gz
- exit -1
- fi
-
- # Si la opcion de descargar el nucleo tambien esta habilitado nos lo descargamos
- if [ $LINUX ] ; then
- if [ -f linux ] ; then
- rm linux
- fi
- wget $URL/linux
- if [ $? = 1 ] ; then
- echo Error no se ha podido descargar el nucleo linux
- exit -1
+ # Ficheros a descargar: Initrd y Kernel (si está habilitado).
+ FILES="initrd.gz"
+ [ $LINUX ] && FILES="$FILES linux"
+
+ for f in $FILES; do
+ # Borrar fichero anterior
+ [ -f "$f" ] && rm -f $f
+ # Descargar fichero (intentar primero actualizaciones).
+ wget $URL/$f || wget ${URL/-updates/}/$f
+ if [ $? != 0 ] ; then
+ echo "Error no se ha podido descarga el initrd.gz"
+ exit 1
fi
- fi
+ done
}
# Descomprimimos el initrd
diff --git a/client/boot/udeblist-lucid.conf b/client/boot/udeblist-lucid.conf
index a88443b3..dfb35622 100644
--- a/client/boot/udeblist-lucid.conf
+++ b/client/boot/udeblist-lucid.conf
@@ -22,10 +22,10 @@ install:reiser4progs-udeb
install:reiserfsprogs-udeb
install:util-linux-udeb
install:xfsprogs-udeb
-install:fs-core-modules-2.6.32-21-generic-di
-install:fs-secondary-modules-2.6.32-21-generic-di
-install:mouse-modules-2.6.32-21-generic-di
-install:pata-modules-2.6.32-21-generic-di
-install:sata-modules-2.6.32-21-generic-di
-install:scsi-modules-2.6.32-21-generic-di
-remove:kernel-image-2.6.32-21-generic-di
+install:fs-core-modules-KERNELVERS-di
+install:fs-secondary-modules-KERNELVERS-di
+install:mouse-modules-KERNELVERS-di
+install:pata-modules-KERNELVERS-di
+install:sata-modules-KERNELVERS-di
+install:scsi-modules-KERNELVERS-di
+remove:kernel-image-KERNELVERS-di
diff --git a/client/boot/upgrade-clients-udeb.sh b/client/boot/upgrade-clients-udeb.sh
index 080340af..afc5229e 100755
--- a/client/boot/upgrade-clients-udeb.sh
+++ b/client/boot/upgrade-clients-udeb.sh
@@ -16,6 +16,7 @@ CFGFILE="$OPENGNSYS/etc/udeblist-$DISTRIB.conf"
OGUDEB="$OPENGNSYS/client/lib/udeb"
TMPUDEB="/tmp/udeb"
UDEBLIST="/etc/apt/sources.list.d/udeb.list"
+KERNELVERS=$(strings $OPENGNSYS/tftpboot/linux | awk '/2.6.*generic/ {print $1}')
# Comprobar fichero de configuración.
if [ ! -f "$CFGFILE" ]; then
@@ -23,7 +24,9 @@ if [ ! -f "$CFGFILE" ]; then
exit 1
fi
PACKAGES_INSTALL=$(awk -F: '$1~/install/ {print $2}' $CFGFILE)
+PACKAGES_INSTALL=${PACKAGES_INSTALL//KERNELVERS/$KERNELVERS}
PACKAGES_REMOVE=$(awk -F: '$1~/remove/ {print $2}' $CFGFILE)
+PACKAGES_REMOVE=${PACKAGES_REMOVE//KERNELVERS/$KERNELVERS}
if [ -z "$PACKAGES_INSTALL" ]; then
echo "$PROG: No hay paquetes para descargar." >&2
exit 2
@@ -31,6 +34,7 @@ fi
# Crear configuración para apt-get
echo "deb http://archive.ubuntu.com/ubuntu/ $DISTRIB main/debian-installer universe/debian-installer" >$UDEBLIST
+echo "deb http://archive.ubuntu.com/ubuntu/ $DISTRIB-updates main/debian-installer universe/debian-installer" >>$UDEBLIST
mkdir -p $TMPUDEB/partial
rm -f $TMPUDEB/*.udeb