[a0867b37] | 1 | #!/bin/bash |
---|
| 2 | #/** |
---|
| 3 | #@file opengnsys_update.sh |
---|
| 4 | #@brief Script actualización de OpenGnSys |
---|
| 5 | #@warning No se actualiza BD, ni ficheros de configuración. |
---|
| 6 | #@version 0.9 - basado en opengnsys_installer.sh |
---|
| 7 | #@author Ramón Gómez - ETSII Univ. Sevilla |
---|
| 8 | #@date 2010/01/27 |
---|
| 9 | #*/ |
---|
| 10 | |
---|
| 11 | |
---|
| 12 | # Sólo ejecutable por usuario root |
---|
| 13 | if [ "$(whoami)" != 'root' ] |
---|
| 14 | then |
---|
| 15 | echo "ERROR: this program must run under root privileges!!" |
---|
| 16 | exit 1 |
---|
| 17 | fi |
---|
| 18 | |
---|
| 19 | # Comprobar si se ha descargado el paquete comprimido (USESVN=0) o sólo el instalador (USESVN=1). |
---|
| 20 | PROGRAMDIR=$(readlink -e $(dirname "$0")) |
---|
| 21 | DEPS="rsync gcc" |
---|
| 22 | if [ -d "$PROGRAMDIR/../installer" ]; then |
---|
| 23 | USESVN=0 |
---|
| 24 | else |
---|
| 25 | USESVN=1 |
---|
| 26 | SVN_URL=svn://www.informatica.us.es:3690/opengnsys/trunk |
---|
| 27 | DEPS="$DEPS subversion" |
---|
| 28 | fi |
---|
| 29 | |
---|
| 30 | WORKDIR=/tmp/opengnsys_update |
---|
| 31 | mkdir -p $WORKDIR |
---|
| 32 | |
---|
| 33 | INSTALL_TARGET=/opt/opengnsys |
---|
| 34 | LOG_FILE=/tmp/opengnsys_update.log |
---|
| 35 | |
---|
| 36 | |
---|
| 37 | |
---|
| 38 | ##################################################################### |
---|
| 39 | ####### Algunas funciones útiles de propósito general: |
---|
| 40 | ##################################################################### |
---|
| 41 | function getDateTime() |
---|
| 42 | { |
---|
| 43 | echo `date +%Y%m%d-%H%M%S` |
---|
| 44 | } |
---|
| 45 | |
---|
| 46 | # Escribe a fichero y muestra por pantalla |
---|
| 47 | function echoAndLog() |
---|
| 48 | { |
---|
| 49 | echo $1 |
---|
| 50 | FECHAHORA=`getDateTime` |
---|
| 51 | echo "$FECHAHORA;$SSH_CLIENT;$1" >> $LOG_FILE |
---|
| 52 | } |
---|
| 53 | |
---|
| 54 | function errorAndLog() |
---|
| 55 | { |
---|
| 56 | echo "ERROR: $1" |
---|
| 57 | FECHAHORA=`getDateTime` |
---|
| 58 | echo "$FECHAHORA;$SSH_CLIENT;ERROR: $1" >> $LOG_FILE |
---|
| 59 | } |
---|
| 60 | |
---|
| 61 | |
---|
| 62 | ##################################################################### |
---|
| 63 | ####### Funciones de copia de seguridad y restauración de ficheros |
---|
| 64 | ##################################################################### |
---|
| 65 | |
---|
| 66 | # Hace un backup del fichero pasado por parámetro |
---|
| 67 | # deja un -last y uno para el día |
---|
| 68 | function backupFile() |
---|
| 69 | { |
---|
| 70 | if [ $# -ne 1 ]; then |
---|
| 71 | errorAndLog "${FUNCNAME}(): invalid number of parameters" |
---|
| 72 | exit 1 |
---|
| 73 | fi |
---|
| 74 | |
---|
| 75 | local fichero=$1 |
---|
| 76 | local fecha=`date +%Y%m%d` |
---|
| 77 | |
---|
| 78 | if [ ! -f $fichero ]; then |
---|
| 79 | errorAndLog "${FUNCNAME}(): file $fichero doesn't exists" |
---|
| 80 | return 1 |
---|
| 81 | fi |
---|
| 82 | |
---|
| 83 | echoAndLog "${FUNCNAME}(): Making $fichero back-up" |
---|
| 84 | |
---|
| 85 | # realiza una copia de la última configuración como last |
---|
| 86 | cp -p $fichero "${fichero}-LAST" |
---|
| 87 | |
---|
| 88 | # si para el día no hay backup lo hace, sino no |
---|
| 89 | if [ ! -f "${fichero}-${fecha}" ]; then |
---|
| 90 | cp -p $fichero "${fichero}-${fecha}" |
---|
| 91 | fi |
---|
| 92 | } |
---|
| 93 | |
---|
| 94 | # Restaura un fichero desde su copia de seguridad |
---|
| 95 | function restoreFile() |
---|
| 96 | { |
---|
| 97 | if [ $# -ne 1 ]; then |
---|
| 98 | errorAndLog "${FUNCNAME}(): invalid number of parameters" |
---|
| 99 | exit 1 |
---|
| 100 | fi |
---|
| 101 | |
---|
| 102 | local fichero=$1 |
---|
| 103 | |
---|
| 104 | echoAndLog "${FUNCNAME}(): restoring $fichero file" |
---|
| 105 | if [ -f "${fichero}-LAST" ]; then |
---|
| 106 | cp -p "$fichero-LAST" "$fichero" |
---|
| 107 | fi |
---|
| 108 | } |
---|
| 109 | |
---|
| 110 | |
---|
| 111 | ##################################################################### |
---|
| 112 | ####### Funciones de instalación de paquetes |
---|
| 113 | ##################################################################### |
---|
| 114 | |
---|
| 115 | # Instalar las deependencias necesarias para el actualizador. |
---|
| 116 | function installDependencies () |
---|
| 117 | { |
---|
| 118 | if [ $# = 0 ]; then |
---|
| 119 | echoAndLog "${FUNCNAME}(): no deps needed." |
---|
| 120 | else |
---|
| 121 | while [ $# -gt 0 ]; do |
---|
| 122 | if ! dpkg -s $1 &>/dev/null; then |
---|
| 123 | INSTALLDEPS="$INSTALLDEPS $1" |
---|
| 124 | fi |
---|
| 125 | shift |
---|
| 126 | done |
---|
| 127 | if [ -n "$INSTALLDEPS" ]; then |
---|
| 128 | apt-get update && apt-get install $INSTALLDEPS |
---|
| 129 | if [ $? -ne 0 ]; then |
---|
| 130 | errorAndLog "${FUNCNAME}(): cannot install some dependencies: $INSTALLDEPS." |
---|
| 131 | return 1 |
---|
| 132 | fi |
---|
| 133 | fi |
---|
| 134 | fi |
---|
| 135 | } |
---|
| 136 | |
---|
| 137 | |
---|
| 138 | ##################################################################### |
---|
| 139 | ####### Funciones para el manejo de Subversion |
---|
| 140 | ##################################################################### |
---|
| 141 | |
---|
| 142 | function svnExportCode() |
---|
| 143 | { |
---|
| 144 | if [ $# -ne 1 ]; then |
---|
| 145 | errorAndLog "${FUNCNAME}(): invalid number of parameters" |
---|
| 146 | exit 1 |
---|
| 147 | fi |
---|
| 148 | |
---|
| 149 | local url=$1 |
---|
| 150 | |
---|
| 151 | echoAndLog "${FUNCNAME}(): downloading subversion code..." |
---|
| 152 | |
---|
[7ad4465] | 153 | svn checkout "${url}" opengnsys |
---|
[a0867b37] | 154 | if [ $? -ne 0 ]; then |
---|
| 155 | errorAndLog "${FUNCNAME}(): error getting code from ${url}, verify your user and password" |
---|
| 156 | return 1 |
---|
| 157 | fi |
---|
| 158 | echoAndLog "${FUNCNAME}(): subversion code downloaded" |
---|
| 159 | return 0 |
---|
| 160 | } |
---|
| 161 | |
---|
| 162 | |
---|
| 163 | ############################################################ |
---|
| 164 | ### Detectar red |
---|
| 165 | ############################################################ |
---|
| 166 | |
---|
| 167 | function getNetworkSettings() |
---|
| 168 | { |
---|
[5d6bf97] | 169 | local MAINDEV |
---|
| 170 | |
---|
| 171 | echoAndLog "getNetworkSettings(): Detecting default network parameters." |
---|
| 172 | MAINDEV=$(ip -o link show up | awk '!/loopback/ {d=d$2} END {sub(/:.*/,"",d); print d}') |
---|
| 173 | if [ -z "$MAINDEV" ]; then |
---|
| 174 | errorAndLog "${FUNCNAME}(): Network device not detected." |
---|
| 175 | return 1 |
---|
[a0867b37] | 176 | fi |
---|
| 177 | |
---|
| 178 | # Variables de ejecución de Apache |
---|
| 179 | # - APACHE_RUN_USER |
---|
| 180 | # - APACHE_RUN_GROUP |
---|
| 181 | if [ -f /etc/apache2/envvars ]; then |
---|
| 182 | source /etc/apache2/envvars |
---|
| 183 | fi |
---|
| 184 | APACHE_RUN_USER=${APACHE_RUN_USER:-"www-data"} |
---|
| 185 | APACHE_RUN_GROUP=${APACHE_RUN_GROUP:-"www-data"} |
---|
| 186 | } |
---|
| 187 | |
---|
| 188 | |
---|
| 189 | ##################################################################### |
---|
| 190 | ####### Funciones específicas de la instalación de Opengnsys |
---|
| 191 | ##################################################################### |
---|
| 192 | |
---|
[cf2142ea] | 193 | # Copiar ficheros de arranque de los servicios del sistema de OpenGnSys |
---|
| 194 | |
---|
| 195 | function updateServicesStart(){ |
---|
| 196 | echoAndLog "${FUNCNAME}(): Updating /etc/init.d/opengnsys ..." |
---|
| 197 | cp -p $WORKDIR/opengnsys/admin/Services/opengnsys.init /etc/init.d/opengnsys |
---|
| 198 | if [ $? != 0 ]; then |
---|
| 199 | errorAndLog "${FUNCNAME}(): Error updating /etc/init.d/opengnsys" |
---|
| 200 | exit 1 |
---|
| 201 | fi |
---|
| 202 | echoAndLog "${FUNCNAME}(): /etc/init.d/opengnsys updated successfully." |
---|
| 203 | } |
---|
| 204 | |
---|
[a0867b37] | 205 | # Copiar ficheros del OpenGnSys Web Console. |
---|
| 206 | function updateWebFiles() |
---|
| 207 | { |
---|
| 208 | echoAndLog "${FUNCNAME}(): Updating web files..." |
---|
| 209 | backupFile $INSTALL_TARGET/www/controlacceso.php |
---|
| 210 | rsync --exclude .svn -irplt $WORKDIR/opengnsys/admin/WebConsole $INSTALL_TARGET/www |
---|
| 211 | if [ $? != 0 ]; then |
---|
| 212 | errorAndLog "${FUNCNAME}(): Error updating web files." |
---|
| 213 | exit 1 |
---|
| 214 | fi |
---|
| 215 | restoreFile $INSTALL_TARGET/www/controlacceso.php |
---|
| 216 | # Cambiar permisos para ficheros especiales. |
---|
| 217 | chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP \ |
---|
| 218 | $INSTALL_TARGET/www/includes \ |
---|
| 219 | $INSTALL_TARGET/www/comandos/gestores/filescripts \ |
---|
| 220 | $INSTALL_TARGET/www/images/iconos |
---|
| 221 | echoAndLog "${FUNCNAME}(): Web files updated successfully." |
---|
| 222 | } |
---|
| 223 | |
---|
| 224 | |
---|
[5d6bf97] | 225 | # Crear documentación Doxygen para la consola web. |
---|
| 226 | function makeDoxygenFiles() |
---|
| 227 | { |
---|
| 228 | echoAndLog "${FUNCNAME}(): Making Doxygen web files..." |
---|
| 229 | $WORKDIR/opengnsys/installer/ogGenerateDoc.sh \ |
---|
| 230 | $WORKDIR/opengnsys/client/engine $INSTALL_TARGET/www |
---|
| 231 | if [ ! -d "$INSTALL_TARGET/www/html" ]; then |
---|
| 232 | errorAndLog "${FUNCNAME}(): unable to create Doxygen web files." |
---|
| 233 | return 1 |
---|
| 234 | fi |
---|
| 235 | mv "$INSTALL_TARGET/www/html" "$INSTALL_TARGET/www/api" |
---|
| 236 | chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP $INSTALL_TARGET/www/api |
---|
| 237 | echoAndLog "${FUNCNAME}(): Doxygen web files created successfully." |
---|
| 238 | } |
---|
| 239 | |
---|
| 240 | |
---|
[a0867b37] | 241 | # Crea la estructura base de la instalación de opengnsys |
---|
| 242 | function createDirs() |
---|
| 243 | { |
---|
| 244 | echoAndLog "${FUNCNAME}(): creating directory paths in ${INSTALL_TARGET}" |
---|
| 245 | |
---|
| 246 | mkdir -p ${INSTALL_TARGET} |
---|
| 247 | mkdir -p ${INSTALL_TARGET}/admin/{autoexec,comandos,menus,usuarios} |
---|
| 248 | mkdir -p ${INSTALL_TARGET}/bin |
---|
| 249 | mkdir -p ${INSTALL_TARGET}/client |
---|
| 250 | mkdir -p ${INSTALL_TARGET}/doc |
---|
| 251 | mkdir -p ${INSTALL_TARGET}/etc |
---|
| 252 | mkdir -p ${INSTALL_TARGET}/lib |
---|
| 253 | mkdir -p ${INSTALL_TARGET}/log/clients |
---|
| 254 | mkdir -p ${INSTALL_TARGET}/sbin |
---|
| 255 | mkdir -p ${INSTALL_TARGET}/www |
---|
| 256 | mkdir -p ${INSTALL_TARGET}/images |
---|
| 257 | ln -fs /var/lib/tftpboot ${INSTALL_TARGET} |
---|
| 258 | ln -fs ${INSTALL_TARGET}/log /var/log/opengnsys |
---|
| 259 | |
---|
| 260 | if [ $? -ne 0 ]; then |
---|
| 261 | errorAndLog "${FUNCNAME}(): error while creating dirs. Do you have write permissions?" |
---|
| 262 | return 1 |
---|
| 263 | fi |
---|
| 264 | |
---|
| 265 | echoAndLog "${FUNCNAME}(): directory paths created" |
---|
| 266 | return 0 |
---|
| 267 | } |
---|
| 268 | |
---|
| 269 | # Copia ficheros de configuración y ejecutables genéricos del servidor. |
---|
| 270 | function updateServerFiles () { |
---|
| 271 | |
---|
| 272 | local SOURCES=( client/boot/initrd-generator \ |
---|
| 273 | client/boot/upgrade-clients-udeb.sh \ |
---|
| 274 | client/boot/udeblist.conf \ |
---|
| 275 | client/boot/udeblist-jaunty.conf \ |
---|
| 276 | client/boot/udeblist-karmic.conf \ |
---|
| 277 | doc ) |
---|
| 278 | local TARGETS=( bin/initrd-generator \ |
---|
| 279 | bin/upgrade-clients-udeb.sh \ |
---|
| 280 | etc/udeblist.conf \ |
---|
| 281 | etc/udeblist-jaunty.conf \ |
---|
| 282 | etc/udeblist-karmic.conf \ |
---|
| 283 | doc ) |
---|
| 284 | |
---|
| 285 | if [ ${#SOURCES[@]} != ${#TARGETS[@]} ]; then |
---|
| 286 | errorAndLog "${FUNCNAME}(): inconsistent number of array items" |
---|
| 287 | exit 1 |
---|
| 288 | fi |
---|
| 289 | |
---|
| 290 | echoAndLog "${FUNCNAME}(): updating files in server directories" |
---|
| 291 | pushd $WORKDIR/opengnsys >/dev/null |
---|
| 292 | local i |
---|
| 293 | for (( i = 0; i < ${#SOURCES[@]}; i++ )); do |
---|
| 294 | rsync --exclude .svn -irplt "${SOURCES[$i]}" "${INSTALL_TARGET}/${TARGETS[$i]}" |
---|
| 295 | done |
---|
| 296 | popd >/dev/null |
---|
| 297 | echoAndLog "${FUNCNAME}(): server files updated successfully." |
---|
| 298 | } |
---|
| 299 | |
---|
| 300 | #################################################################### |
---|
| 301 | ### Funciones de compilación de código fuente de servicios |
---|
| 302 | #################################################################### |
---|
| 303 | |
---|
| 304 | # Recompilar y actualiza el binario del clinete |
---|
| 305 | function recompileClient () |
---|
| 306 | { |
---|
| 307 | # Compilar OpenGnSys Client |
---|
| 308 | echoAndLog "${FUNCNAME}(): recompiling OpenGnSys Client" |
---|
| 309 | pushd $WORKDIR/opengnsys/admin/Services/ogAdmClient |
---|
| 310 | make && mv ogAdmClient ../../../client/nfsexport/bin |
---|
| 311 | if [ $? -ne 0 ]; then |
---|
| 312 | echoAndLog "${FUNCNAME}(): error while compiling OpenGnSys Client" |
---|
| 313 | hayErrores=1 |
---|
| 314 | fi |
---|
| 315 | popd |
---|
| 316 | |
---|
| 317 | return $hayErrores |
---|
| 318 | } |
---|
| 319 | |
---|
| 320 | |
---|
| 321 | #################################################################### |
---|
| 322 | ### Funciones instalacion cliente opengnsys |
---|
| 323 | #################################################################### |
---|
| 324 | |
---|
| 325 | function updateClient() |
---|
| 326 | { |
---|
| 327 | local OSDISTRIB OSCODENAME |
---|
| 328 | |
---|
| 329 | local hayErrores=0 |
---|
| 330 | |
---|
| 331 | echoAndLog "${FUNCNAME}(): Copying OpenGnSys Client files." |
---|
| 332 | rsync --exclude .svn -irplt $WORKDIR/opengnsys/client/nfsexport/* $INSTALL_TARGET/client |
---|
| 333 | echoAndLog "${FUNCNAME}(): Copying OpenGnSys Cloning Engine files." |
---|
| 334 | mkdir -p $INSTALL_TARGET/client/lib/engine/bin |
---|
| 335 | rsync -iplt $WORKDIR/opengnsys/client/engine/*.lib $INSTALL_TARGET/client/lib/engine/bin |
---|
| 336 | if [ $? -ne 0 ]; then |
---|
| 337 | errorAndLog "${FUNCNAME}(): error while copying engine files" |
---|
| 338 | hayErrores=1 |
---|
| 339 | fi |
---|
| 340 | |
---|
| 341 | # Cargar Kernel, Initrd y paquetes udeb para la distribución del servidor (o por defecto). |
---|
| 342 | OSDISTRIB=$(lsb_release -i | awk -F: '{sub(/\t/,""); print $2}') 2>/dev/null |
---|
| 343 | OSCODENAME=$(lsb_release -c | awk -F: '{sub(/\t/,""); print $2}') 2>/dev/null |
---|
| 344 | if [ "$OSDISTRIB" = "Ubuntu" -a -n "$OSCODENAME" ]; then |
---|
| 345 | echoAndLog "${FUNCNAME}(): Loading Kernel and Initrd files for $OSDISTRIB $OSCODENAME." |
---|
| 346 | $INSTALL_TARGET/bin/initrd-generator -t $INSTALL_TARGET/tftpboot -v "$OSCODENAME" |
---|
| 347 | if [ $? -ne 0 ]; then |
---|
| 348 | errorAndLog "${FUNCNAME}(): error while generating initrd OpenGnSys Admin Client" |
---|
| 349 | hayErrores=1 |
---|
| 350 | fi |
---|
| 351 | echoAndLog "${FUNCNAME}(): Loading udeb files for $OSDISTRIB $OSCODENAME." |
---|
| 352 | $INSTALL_TARGET/bin/upgrade-clients-udeb.sh "$OSCODENAME" |
---|
| 353 | if [ $? -ne 0 ]; then |
---|
| 354 | errorAndLog "${FUNCNAME}(): error while upgrading udeb files OpenGnSys Admin Client" |
---|
| 355 | hayErrores=1 |
---|
| 356 | fi |
---|
| 357 | else |
---|
| 358 | echoAndLog "${FUNCNAME}(): Loading default Kernel and Initrd files." |
---|
| 359 | $INSTALL_TARGET/bin/initrd-generator -t $INSTALL_TARGET/tftpboot/ |
---|
| 360 | if [ $? -ne 0 ]; then |
---|
| 361 | errorAndLog "${FUNCNAME}(): error while generating initrd OpenGnSys Admin Client" |
---|
| 362 | hayErrores=1 |
---|
| 363 | fi |
---|
| 364 | echoAndLog "${FUNCNAME}(): Loading default udeb files." |
---|
| 365 | $INSTALL_TARGET/bin/upgrade-clients-udeb.sh |
---|
| 366 | if [ $? -ne 0 ]; then |
---|
| 367 | errorAndLog "${FUNCNAME}(): error while upgrading udeb files OpenGnSys Admin Client" |
---|
| 368 | hayErrores=1 |
---|
| 369 | fi |
---|
| 370 | fi |
---|
| 371 | |
---|
| 372 | if [ $hayErrores -eq 0 ]; then |
---|
| 373 | echoAndLog "${FUNCNAME}(): Client generation success." |
---|
| 374 | else |
---|
| 375 | errorAndLog "${FUNCNAME}(): Client generation with errors" |
---|
| 376 | fi |
---|
| 377 | |
---|
| 378 | return $hayErrores |
---|
| 379 | } |
---|
| 380 | |
---|
| 381 | |
---|
| 382 | |
---|
| 383 | ##################################################################### |
---|
[3320409] | 384 | ####### Proceso de actualización de OpenGnSys |
---|
[a0867b37] | 385 | ##################################################################### |
---|
| 386 | |
---|
| 387 | |
---|
| 388 | echoAndLog "OpenGnSys update begins at $(date)" |
---|
| 389 | |
---|
| 390 | # Instalar dependencia. |
---|
| 391 | installDependencies $DEPS |
---|
| 392 | if [ $? -ne 0 ]; then |
---|
| 393 | errorAndLog "Error: you may install all needed dependencies." |
---|
| 394 | exit 1 |
---|
| 395 | fi |
---|
| 396 | |
---|
| 397 | pushd $WORKDIR |
---|
| 398 | |
---|
| 399 | # Detectar parámetros de red por defecto |
---|
| 400 | getNetworkSettings |
---|
| 401 | if [ $? -ne 0 ]; then |
---|
| 402 | errorAndLog "Error reading default network settings." |
---|
| 403 | exit 1 |
---|
| 404 | fi |
---|
| 405 | |
---|
| 406 | # Arbol de directorios de OpenGnSys. |
---|
| 407 | createDirs ${INSTALL_TARGET} |
---|
| 408 | if [ $? -ne 0 ]; then |
---|
| 409 | errorAndLog "Error while creating directory paths!" |
---|
| 410 | exit 1 |
---|
| 411 | fi |
---|
| 412 | |
---|
| 413 | # Si es necesario, descarga el repositorio de código en directorio temporal |
---|
| 414 | if [ $USESVN -eq 1 ]; then |
---|
| 415 | svnExportCode $SVN_URL |
---|
| 416 | if [ $? -ne 0 ]; then |
---|
| 417 | errorAndLog "Error while getting code from svn" |
---|
| 418 | exit 1 |
---|
| 419 | fi |
---|
| 420 | else |
---|
| 421 | ln -fs "$(dirname $PROGRAMDIR)" opengnsys |
---|
| 422 | fi |
---|
| 423 | |
---|
| 424 | # Copiando ficheros complementarios del servidor |
---|
| 425 | updateServerFiles |
---|
| 426 | if [ $? -ne 0 ]; then |
---|
| 427 | errorAndLog "Error updating OpenGnSys Server files" |
---|
| 428 | exit 1 |
---|
| 429 | fi |
---|
| 430 | |
---|
| 431 | # Copiando paqinas web |
---|
| 432 | updateWebFiles |
---|
| 433 | if [ $? -ne 0 ]; then |
---|
| 434 | errorAndLog "Error updating OpenGnSys Web Admin files" |
---|
| 435 | exit 1 |
---|
| 436 | fi |
---|
[5d6bf97] | 437 | # Generar páginas Doxygen para instalar en el web |
---|
| 438 | makeDoxygenFiles |
---|
[a0867b37] | 439 | |
---|
| 440 | # Creando la estructura del cliente |
---|
| 441 | recompileClient |
---|
| 442 | updateClient |
---|
| 443 | if [ $? -ne 0 ]; then |
---|
| 444 | errorAndLog "Error updating clients" |
---|
| 445 | exit 1 |
---|
| 446 | fi |
---|
| 447 | |
---|
[95f1f68] | 448 | # Actualizamos el fichero que arranca los servicios de OpenGnSys |
---|
| 449 | |
---|
| 450 | updateServicesStart |
---|
| 451 | |
---|
[3320409] | 452 | # Eliminamos el fichero de estado del tracker porque es incompatible entre los distintos paquetes |
---|
| 453 | if [ -r /tmp/dstate ] |
---|
| 454 | then |
---|
| 455 | rm /tmp/dstate |
---|
| 456 | fi |
---|
| 457 | |
---|
[a0867b37] | 458 | #rm -rf $WORKDIR |
---|
| 459 | echoAndLog "OpenGnSys update finished at $(date)" |
---|
| 460 | |
---|
| 461 | popd |
---|
| 462 | |
---|