home *** CD-ROM | disk | FTP | other *** search
/ ftp.ac-grenoble.fr / 2015.02.ftp.ac-grenoble.fr.tar / ftp.ac-grenoble.fr / pub / slis / updates_rsync / slis_update-academie < prev    next >
Text File  |  2000-05-17  |  3KB  |  107 lines

  1. #!/bin/bash
  2.  
  3. # slis_update-academie
  4. # Script de mise α jour tΘlΘchargΘ rΘguliΦrement par rsync par tous les
  5. # serveurs SLIS de l'academie
  6.  
  7. # This script is part of the SLIS Project initiated by the CARMI-Internet
  8. # (AcadΘmie de Grenoble - France 38).
  9. # Ce script fait partie du projet SLIS dΘmarrΘ par le CARMI-Internet
  10. # (AcadΘmie de Grenoble - France 38).
  11. #
  12. # SLIS : Serveur de communications Linux pour l'Internet Scolaire.
  13. # Copyright (C) 1998-2000 Bruno Bzeznik
  14. #
  15. #    This program is free software; you can redistribute it and/or modify
  16. #    it under the terms of the GNU General Public License as published by
  17. #    the Free Software Foundation; either version 2 of the License, or
  18. #    (at your option) any later version.
  19. #
  20. #    This program is distributed in the hope that it will be useful,
  21. #    but WITHOUT ANY WARRANTY; without even the implied warranty of
  22. #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  23. #    GNU General Public License for more details.
  24. #    You should have received a copy of the GNU General Public License
  25. #    along with this program (For example ./COPYING);
  26. #    if not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  27. #    Cambridge, MA 02139, USA.
  28. #
  29. # Please send all comments and bug reports by electronic mail to:
  30. #   Bruno Bzeznik <Bruno@ac-grenoble.fr>
  31. # or to <slis@ac-grenoble.fr>
  32. #
  33. # Envoyez vos suggestions et reports de bugs par e-mail α
  34. #   Bruno Bzeznik <Bruno@ac-grenoble.fr>
  35. # ou α <slis@ac-grenoble.fr>
  36. #
  37.  
  38. ### VARIABLES ###
  39. UPDDIR=/home/hadmin/updates # Rep pour les flags
  40. LOGTAG="slis_update[$$]" # Ce qui apparait en syslog
  41. PAS_UPD_KERNEL=0        # Si ce flag est a un, alors la mise a jour du noyau
  42.                 # (qui necessite reboot) ne sera pas faite cette fois.
  43. # Recuperation de la variable HOSTNAME :
  44. grep HOSTNAME /etc/sysconfig/network > /tmp/hostname
  45. . /tmp/hostname
  46. rm -rf /tmp/hostname
  47.  
  48. QUEUE=/home/hadmin/cgi-bin/queue     # File d'attente SLIS
  49. BASE=/home/hadmin/cgi-bin/base        # Base SLIS
  50. BINDIR=/usr/local/sbin            # Scripts et binaires SLIS
  51. ACAD_DOMAIN=ac-grenoble.fr        # Domaine
  52. MAILSERVER=pluton            # Serveur de messagerie du domaine (nom sans le domaine)
  53. IPMAILSERVER=193.54.149.10        # Adresse ip du serveur de messagerie
  54. TFTP=pluton.ac-grenoble.fr        # Serveur tftp des mises α jour (obsolete)
  55. RSYNC=pluton.ac-grenoble.fr        # Serveur rsync des mises α jour
  56. MODULE=slis-updates            # Module rsync du serveur des mises α jour
  57. FTP=ftp.ac-grenoble.fr            # Serveur anonyme de mises α jour RedHat
  58. TIME=pluton.ac-grenoble.fr        # Serveur d'heure
  59. SLISMASTER=Bruno@ac-grenoble.fr        # Administrateur acadΘmique SLIS
  60. WEBMASTER=`ls -ld /home/httpd/html |awk '{print $3}'` # Webmaster designΘ par l'admin local
  61.  
  62. . /home/hadmin/slis.conf
  63.  
  64. ##################
  65.  
  66. # Gestion d'un lock
  67. if [ -e /var/lock/slis_upd ]
  68. then 
  69.   logger -t "$LOGTAG" "Deja en cours. Abandon."
  70.   exit
  71. fi
  72. touch /var/lock/slis_upd
  73. sleep 1
  74.  
  75. logger -t "$LOGTAG" "Script Academie Debut"
  76.  
  77. #######################
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87. # Ici le script de mise a jour specifique au domaine
  88. # ou a l'academie qui a mis SLIS en place
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101. ######################
  102.  
  103. ##############################
  104. logger -t "$LOGTAG" "Script Academie Termine."
  105.  
  106. /bin/rm -rf /var/lock/slis_upd
  107.