918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Last change
on this file since bf54d36 was
6354c7b,
checked in by ramon <ramongomez@…>, 15 years ago
|
Instalador detecta correctamente dependencias no instaladas; mejora en rendimiento descarga de paquetes udeb.
git-svn-id: https://opengnsys.es/svn/trunk@925 a21b9725-9963-47de-94b9-378ad31fedc9
|
-
Property mode set to
100755
|
File size:
1.5 KB
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | #@file upgrade-clients-udeb.sh |
---|
3 | #@brief Actualiza los paquetes udeb que deben ser exportados a los clientes. |
---|
4 | #@arg \c distrib - nombre de la distribución de Ubuntu (karmic, jaunty, ...). |
---|
5 | #@note El script debe ser copiado a \c opengnsys/bin y el fichero de configuración a \c opengnsys/etc |
---|
6 | #@note Formato del fichero \c udeb.list : {install|remove}:paquete |
---|
7 | |
---|
8 | |
---|
9 | # Variables |
---|
10 | PROG="$(basename $0)" |
---|
11 | OPENGNSYS=${OPENGNSYS:-"/opt/opengnsys"} |
---|
12 | DISTRIB=${1:-"jaunty"} |
---|
13 | CFGFILE="$OPENGNSYS/etc/udeblist${1:+"-$1"}.conf" |
---|
14 | OGUDEB="$OPENGNSYS/client/lib/udeb" |
---|
15 | TMPUDEB="/tmp/udeb" |
---|
16 | UDEBLIST="/etc/apt/sources.list.d/udeb.list" |
---|
17 | |
---|
18 | #/// Comprobar fichero de configuración. |
---|
19 | if [ ! -f "$CFGFILE" ]; then |
---|
20 | echo "$PROG: No existe el fichero de configuración \"$CFGFILE\"" >&2 |
---|
21 | exit 1 |
---|
22 | fi |
---|
23 | PACKAGES_INSTALL=$(awk -F: '$1~/install/ {print $2}' $CFGFILE) |
---|
24 | PACKAGES_REMOVE=$(awk -F: '$1~/remove/ {print $2}' $CFGFILE) |
---|
25 | if [ -z "$PACKAGES_INSTALL" ]; then |
---|
26 | echo "$PROG: No hay paquetes para descargar." >&2 |
---|
27 | exit 2 |
---|
28 | fi |
---|
29 | |
---|
30 | #/// Crear configuración para apt-get |
---|
31 | echo "deb http://archive.ubuntu.com/ubuntu/ $DISTRIB main/debian-installer" >$UDEBLIST |
---|
32 | mkdir -p $TMPUDEB/partial |
---|
33 | rm -f $TMPUDEB/*.udeb |
---|
34 | |
---|
35 | #/// Descargar paquetes udeb, borrar los descartables y moverlos al NFS. |
---|
36 | apt-get update |
---|
37 | apt-get install -y -o dir::cache::archives=$TMPUDEB -d $PACKAGES_INSTALL |
---|
38 | for i in $PACKAGES_REMOVE; do |
---|
39 | rm -f $TMPUDEB/${i}_*.udeb |
---|
40 | done |
---|
41 | rm -f $OGUDEB/*.udeb |
---|
42 | mv $TMPUDEB/*.udeb $OGUDEB |
---|
43 | rm -f $UDEBLIST |
---|
44 | |
---|
Note: See
TracBrowser
for help on using the repository browser.