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_4.0_rsync / lcslis_dom0_update-common-post < prev    next >
Text File  |  2007-06-20  |  2KB  |  70 lines

  1. #!/bin/bash
  2. # This script is part of the SLIS Project initiated by the CARMI-Internet
  3. # (AcadΘmie de Grenoble - France 38).
  4. # Ce script fait partie du projet SLIS dΘmarrΘ par le CARMI-Internet
  5. # (AcadΘmie de Grenoble - France 38).
  6. #
  7. # SLIS : Serveur de communications Linux pour l'Internet Scolaire.
  8. # Copyright (C) 1998-2003 Bruno Bzeznik
  9. #
  10. #    This program is free software; you can redistribute it and/or modify
  11. #    it under the terms of the GNU General Public License as published by
  12. #    the Free Software Foundation; either version 2 of the License, or
  13. #    (at your option) any later version.
  14. #
  15. #    This program is distributed in the hope that it will be useful,
  16. #    but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18. #    GNU General Public License for more details.
  19. #    You should have received a copy of the GNU General Public License
  20. #    along with this program (For example ./COPYING);
  21. #    if not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  22. #    Cambridge, MA 02139, USA.
  23. #
  24. # Please send all comments and bug reports by electronic mail to:
  25. #   Bruno Bzeznik <Bruno@ac-grenoble.fr>
  26. # or to <slis@ac-grenoble.fr>
  27. #
  28. # Envoyez vos suggestions et reports de bugs par e-mail α
  29. #   Bruno Bzeznik <Bruno@ac-grenoble.fr>
  30. # ou α <slis@ac-grenoble.fr>
  31. #
  32. # Contact: Olivier.LeCam@crdp.ac-versailles.fr
  33. #
  34. # Comments:
  35. # Downloaded via rsync and executed by SLIS during
  36. # the 'slis_update' process
  37. # Started after the version updates
  38. #
  39. # Updates:
  40. # olecam: Jan 9, 2006: script ported to SLIS v4
  41.  
  42. #
  43. # VARIABLES 
  44. #
  45. LOGTAG="lcslis_dom0_update-common-post[$$]"
  46. LOCKFILE="/var/lock/lcslis_dom0_update-common-post"
  47. SCRIPT_STATUS_MSG="Script 'lcslis_dom0_common-post'"
  48. UPDDIR="/etc/slis/updates"
  49.  
  50. #
  51. # Locking
  52. #
  53. if [ -e $LOCKFILE ]
  54. then
  55.       logger -t "$LOGTAG" "Lock found. Update already started."
  56.       exit
  57. fi
  58. touch $LOCKFILE
  59. sleep 1
  60.  
  61. [ -d $UPDDIR ] || /bin/mkdir -p $UPDDIR
  62. logger -t "$LOGTAG" "$SCRIPT_STATUS_MSG: started."
  63. ##############################
  64.  
  65.  
  66. ##############################
  67. logger -t "$LOGTAG" "$SCRIPT_STATUS_MSG: successed."
  68.  
  69. rm -f $LOCKFILE
  70.