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-3.0 < prev    next >
Text File  |  2006-04-06  |  100KB  |  3,355 lines

  1. #!/bin/bash
  2.  
  3. # slis_update-3.0
  4. # Updates for SLIS 3.0
  5.  
  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-2002 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
  40. LOGTAG="slis_update[$$]"
  41. grep HOSTNAME /etc/sysconfig/network > /tmp/hostname
  42. . /tmp/hostname
  43. rm -rf /tmp/hostname
  44. WEBMASTER=`ls -ld /home/httpd/html |awk '{print $3}'`
  45. . /home/hadmin/slis.conf
  46.  
  47. ##################
  48.  
  49. # Locking
  50. if [ -e /var/lock/slis_upd ]
  51. then
  52.   logger -t "$LOGTAG" "Lock found. Update already started."
  53.   exit
  54. fi
  55. touch /var/lock/slis_upd
  56. sleep 1
  57.  
  58. logger -t "$LOGTAG" "Script Version 3.0 started."
  59.  
  60.  
  61. ############################################################################
  62. ### Update 3.x-01 - 01/10/2002
  63. # Bug fix: CyberSchool was not working because of misplaced smb.conf
  64. # Obsoletes :
  65. ############################################################################
  66.  
  67. if [ ! \( -e $UPDDIR/3.x-01 \) ]
  68. then
  69.  
  70.   mv -f /etc/samba/smb.conf /etc/samba/smb.conf.orig
  71.   ln -s /etc/smb.conf /etc/samba/smb.conf
  72.   /etc/rc.d/init.d/smb restart
  73.  
  74.   touch $UPDDIR/3.x-01
  75.   logger -t "$LOGTAG" "Update 3.x-01 Done."
  76. fi
  77. ###
  78.  
  79. ############################################################################
  80. ### Update 3.0-02 - 03/10/2002
  81. # Bug fix: DNS configuration was incorrect (external view)
  82. # This update replaces mknamedconf and mknamedzones and then
  83. # restarts bind.
  84. # Obsoletes :
  85. ############################################################################
  86.  
  87. if [ ! \( -e $UPDDIR/3.0-02 \) ]
  88. then
  89.  
  90.   # Download the files
  91.   cd /tmp
  92.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.0-02.tgz .
  93.  
  94.   # Do the things...
  95.   tar zxf upd-3.0-02.tgz --exclude usr/local/ --directory /
  96.   RC=$?
  97.   /usr/local/sbin/permslis
  98.  
  99.   # Check and finish
  100.   if [ $RC = 0 ]
  101.   then
  102.  
  103.     cp -af /var/named /var/named.upd-3.0-02
  104.     cp -f /etc/named.conf /etc/named.conf.upd-3.0-02
  105.     /usr/local/sbin/mknamedconf > /etc/named.conf
  106.     /usr/local/sbin/mknamedzones
  107.     /etc/rc.d/init.d/named restart
  108.     sleep 3
  109.  
  110.     touch $UPDDIR/3.0-02
  111.     logger -t "$LOGTAG" "Update 3.0-02 Done."
  112.   else
  113.     logger -t "$LOGTAG" "Update 3.0-02 FAILED."
  114.   fi
  115. fi
  116. ###
  117.  
  118. ############################################################################
  119. ### Update 3.x-03 - updated 22/11/2002 - updated 20/03/2003 - updated 18/11/2003
  120. # SECURITY
  121. # Obsoletes : 3.x-03 of 15/10/2002
  122. # Obsoletes : 3.x-03 of 22/11/2002
  123. # Obsoletes : 3.x-03 of 18/11/2003
  124. ############################################################################
  125.  
  126. declare -i HOUR
  127. HOUR=`date +%k`
  128. if [ ! \( -e $UPDDIR/3.x-03 \) -a $HOUR -lt 6 ]
  129. then
  130.  
  131.   # Download the files
  132.   cd /tmp
  133.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/tar-1.13.25-4.7.1.i386.rpm .
  134.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/glibc-2.2.5-44.i386.rpm .
  135.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/glibc-common-2.2.5-44.i386.rpm .
  136.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/nss_ldap-189-4.i386.rpm .
  137.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/fetchmail-5.9.0-20.i386.rpm .
  138.  
  139.   # Do the things...
  140.   rpm -U tar-1.13.25-4.7.1.i386.rpm glibc-2.2.5-44.i386.rpm \
  141.     glibc-common-2.2.5-44.i386.rpm nss_ldap-189-4.i386.rpm
  142.   RC1=$?
  143.   rpm -F fetchmail-5.9.0-20.i386.rpm
  144.   RC2=$?
  145.  
  146.   # Check and finish
  147.   if [ $RC1 = 0 -a $RC2 = 0 ]
  148.   then
  149.     touch $UPDDIR/3.x-03
  150.     logger -t "$LOGTAG" "Update 3.x-03 Done."
  151.   else
  152.     logger -t "$LOGTAG" "Update 3.x-03 FAILED."
  153.   fi
  154. fi
  155. ###
  156.  
  157. ############################################################################
  158. ### Update 3.x-04 - 15/10/2002
  159. # Bug fix: squid is down often in the night, after log rotation
  160. # Obsoletes :
  161. ############################################################################
  162.  
  163. if [ ! \( -e $UPDDIR/3.x-04 \) ]
  164. then
  165.  
  166.   # Download the files
  167.   cd /tmp
  168.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-04.tgz .
  169.  
  170.   # Do the things...
  171.   tar zxf upd-3.x-04.tgz --exclude usr/local/ --directory /
  172.   RC=$?
  173.   /usr/local/sbin/permslis
  174.  
  175.   # Check and finish
  176.   if [ $RC = 0 ]
  177.   then
  178.  
  179.     touch $UPDDIR/3.x-04
  180.     logger -t "$LOGTAG" "Update 3.x-04 Done."
  181.   else
  182.     logger -t "$LOGTAG" "Update 3.x-04 FAILED."
  183.   fi
  184. fi
  185. ###
  186.  
  187. ############################################################################
  188. ### Update 2.x_3.x-01 - 21/10/2002
  189. # Enhancement: Backup/Restore takes now ldap passwords into account
  190. # Obsoletes :
  191. ############################################################################
  192.  
  193. if [ ! \( -e $UPDDIR/2.x_3.x-01 \) ]
  194. then
  195.  
  196.   # Download the files
  197.   cd /tmp
  198.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-2.x_3.x-01.tgz .
  199.  
  200.   # Do the things...
  201.   tar zxf upd-2.x_3.x-01.tgz --exclude usr/local/ --directory /
  202.   RC=$?
  203.   /usr/local/sbin/permslis
  204.  
  205.   # Check and finish
  206.   if [ $RC = 0 ]
  207.   then
  208.     touch $UPDDIR/2.x_3.x-01
  209.     logger -t "$LOGTAG" "Update 2.x_3.x-01 Done."
  210.   else
  211.     logger -t "$LOGTAG" "Update 2.x_3.x-01 FAILED."
  212.   fi
  213. fi
  214. ###
  215.  
  216. ############################################################################
  217. ### Update 3.x-05 - 08/11/2002
  218. # Bug fixes / Enhancements:
  219. # - Set php max_execution_time to 10 minutes, for hadmin
  220. # - Set the ldap sizelimit to 5000 instead of 500 which is the default
  221. # - Allow .htaccess file creation into /home/httpd/html for authconfigs
  222. # - Added a rm of /var/lib/logrotate.status if empty into squid_rotate
  223. # - Fixed a little bug into administrator.php (erase of hadmin http users 
  224. # that contain "admin") thanks to Rennes
  225. # - Fixed the bug for too long urls into accesslog2sql
  226. # Obsoletes :
  227. ############################################################################
  228.  
  229. if [ ! \( -e $UPDDIR/3.x-05 \) ]
  230. then
  231.  
  232.   # Increase the php max execution time for hadmin
  233.   cp -f /etc/hadmin/php.ini /etc/hadmin/php.ini.upd-3.x-05
  234.   perl -pi -e 's/max_execution_time.*=.*/max_execution_time = 600/' /etc/hadmin/php.ini   
  235.  
  236.   # Increase the max number of results returned by ldap server
  237.   if [ "`grep sizelimit /etc/openldap/slapd.conf`" = "" ]
  238.   then
  239.     cp -f /etc/openldap/slapd.conf /etc/openldap/slapd.conf.upd-3.x-05
  240.     perl -pi -e 's/^database/sizelimit       5000\ndatabase/' /etc/openldap/slapd.conf
  241.   fi
  242.  
  243.   # New httpd.conf and squid_rotate
  244.   cp -f /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.upd-3.x-05
  245.   cd /tmp
  246.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-05.tgz .
  247.   tar zxf upd-3.x-05.tgz --exclude usr/local/ --directory /
  248.   RC=$?
  249.   /usr/local/sbin/permslis
  250.  
  251.   # Check and finish
  252.   if [ $RC = 0 ]
  253.   then
  254.     killall -HUP httpd
  255.     /etc/rc.d/init.d/ldap restart
  256.     touch $UPDDIR/3.x-05
  257.     logger -t "$LOGTAG" "Update 3.x-05 Done."
  258.   else
  259.     logger -t "$LOGTAG" "Update 3.x-05 FAILED."
  260.   fi
  261. fi
  262. ###
  263.  
  264. ############################################################################
  265. ### Update 3.x-06 - 08/11/2002
  266. # BUG FIX: ldap crashes with large number of users (more than 1000)
  267. # Obsoletes :
  268. ############################################################################
  269.  
  270. if [ ! \( -e $UPDDIR/3.x-06 \) ]
  271. then
  272.  
  273.   # Download the files
  274.   cd /tmp
  275.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/openldap-2.0.25-1.i386.rpm .
  276.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/openldap-servers-2.0.25-1.i386.rpm .
  277.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/openldap-clients-2.0.25-1.i386.rpm .
  278.  
  279.   # Do the things...
  280.   rpm -F openldap-2.0.25-1.i386.rpm \
  281.      openldap-servers-2.0.25-1.i386.rpm \
  282.      openldap-clients-2.0.25-1.i386.rpm
  283.   RC=$?
  284.  
  285.   # Check and finish
  286.   if [ $RC = 0 ]
  287.   then
  288.     /etc/rc.d/init.d/ldap restart
  289.     touch $UPDDIR/3.x-06
  290.     logger -t "$LOGTAG" "Update 3.x-06 Done."
  291.   else
  292.     logger -t "$LOGTAG" "Update 3.x-06 FAILED."
  293.   fi
  294. fi
  295. ###
  296.  
  297. ############################################################################
  298. ### Update 3.x-07 - 13/11/2002
  299. # SECURITY: official updates from redhat
  300. # Obsoletes :
  301. ############################################################################
  302.  
  303. if [ ! \( -e $UPDDIR/3.x-07 \) ]
  304. then
  305.  
  306.   # Download the files
  307.   cd /tmp
  308.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/xinetd-2.3.9-0.73.i386.rpm .
  309.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/php-4.1.2-7.3.6.i386.rpm .
  310.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/php-imap-4.1.2-7.3.6.i386.rpm .
  311.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/php-ldap-4.1.2-7.3.6.i386.rpm .
  312.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/php-mysql-4.1.2-7.3.6.i386.rpm .
  313.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/php-pgsql-4.1.2-7.3.6.i386.rpm .
  314.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/krb5-libs-1.2.4-3.i386.rpm .
  315.  
  316.   # Do the things...
  317.   rpm -F xinetd-2.3.9-0.73.i386.rpm \
  318.          php-4.1.2-7.3.6.i386.rpm \
  319.          php-imap-4.1.2-7.3.6.i386.rpm \
  320.          php-ldap-4.1.2-7.3.6.i386.rpm \
  321.          php-mysql-4.1.2-7.3.6.i386.rpm \
  322.          php-pgsql-4.1.2-7.3.6.i386.rpm \
  323.          krb5-libs-1.2.4-3.i386.rpm
  324.   RC=$?
  325.  
  326.   # Check and finish
  327.   if [ $RC = 0 ]
  328.   then
  329.     touch $UPDDIR/3.x-07
  330.     logger -t "$LOGTAG" "Update 3.x-07 Done."
  331.   else
  332.     logger -t "$LOGTAG" "Update 3.x-07 FAILED."
  333.   fi
  334. fi
  335. ###
  336.  
  337. ############################################################################
  338. ### Update 3.x-08 - 15/11/2002
  339. # Enhancement: new option "http reverse" (experimental for now)
  340. # Obsoletes :
  341. ############################################################################
  342.  
  343. if [ ! \( -e $UPDDIR/3.x-08 \) ]
  344. then
  345.  
  346.   # Download the files
  347.   cd /tmp
  348.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-08.tgz .
  349.  
  350.   # Do the things...
  351.   tar zxf upd-3.x-08.tgz --exclude usr/local/ --directory /
  352.   RC=$?
  353.   /usr/local/sbin/permslis
  354.  
  355.   # Check and finish
  356.   if [ $RC = 0 ]
  357.   then
  358.     
  359.     cp -f /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd_norm.conf
  360.     /usr/local/sbin/init_options -u 2>/dev/null
  361.     /usr/local/sbin/valid
  362.  
  363.     touch $UPDDIR/3.x-08
  364.     logger -t "$LOGTAG" "Update 3.x-08 Done."
  365.   else
  366.     logger -t "$LOGTAG" "Update 3.x-08 FAILED."
  367.   fi
  368. fi
  369. ###
  370.  
  371. ############################################################################
  372. ### Update 2.x_3.x-02 - 21/11/2002
  373. # Bug fix: (clientgw) changing a password with more than 8 chars caused an
  374. # error and the user losing the password.
  375. # Obsoletes :
  376. ############################################################################
  377.  
  378. if [ ! \( -e $UPDDIR/2.x_3.x-02 \) ]
  379. then
  380.  
  381.   # Download the files
  382.   cd /tmp
  383.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-2.x_3.x-02.tgz .
  384.  
  385.   # Do the things...
  386.   tar zxf upd-2.x_3.x-02.tgz --exclude usr/local/ --directory /
  387.   RC=$?
  388.   /usr/local/sbin/permslis
  389.  
  390.   # Check and finish
  391.   if [ $RC = 0 ]
  392.   then
  393.     touch $UPDDIR/2.x_3.x-02
  394.     logger -t "$LOGTAG" "Update 2.x_3.x-02 Done."
  395.   else
  396.     logger -t "$LOGTAG" "Update 2.x_3.x-02 FAILED."
  397.   fi
  398. fi
  399. ###
  400.  
  401. ############################################################################
  402. ### Update 3.x-10 - 22/11/2002
  403. # Bug fix: ftp client is missing
  404. # Enhancement: added lsof
  405. # Obsoletes :
  406. ############################################################################
  407.  
  408. if [ ! \( -e $UPDDIR/3.x-10 \) ]
  409. then
  410.  
  411.   # Download the files
  412.   cd /tmp
  413.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/ftp-0.17-13.i386.rpm .
  414.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/lsof-4.51-2.i386.rpm .
  415.  
  416.   # Do the things...
  417.   rpm -U ftp-0.17-13.i386.rpm lsof-4.51-2.i386.rpm
  418.   RC1=$?
  419.  
  420.   # Check and finish
  421.   if [ $RC1 = 0 ]
  422.   then
  423.     touch $UPDDIR/3.x-10
  424.     logger -t "$LOGTAG" "Update 3.x-10 Done."
  425.   else
  426.     logger -t "$LOGTAG" "Update 3.x-10 FAILED."
  427.   fi
  428. fi
  429. ###
  430.  
  431.  
  432. ############################################################################
  433. ### Update 3.x-12 - 28/11/2002
  434. # Enhancement: new option "transparent proxy"
  435. # Obsoletes :
  436. ############################################################################
  437.  
  438. if [ ! \( -e $UPDDIR/3.x-12 \) ]
  439. then
  440.  
  441.   # Download the files
  442.   cd /tmp
  443.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-12.tgz .
  444.  
  445.   # Do the things...
  446.   tar zxf upd-3.x-12.tgz --exclude usr/local/ --directory /
  447.   RC=$?
  448.   /usr/local/sbin/permslis
  449.  
  450.   # Check and finish
  451.   if [ $RC = 0 ]
  452.   then
  453.  
  454.     /usr/local/sbin/init_options -u 2>/dev/null
  455.     /usr/local/sbin/valid
  456.  
  457.     touch $UPDDIR/3.x-12
  458.     logger -t "$LOGTAG" "Update 3.x-12 Done."
  459.   else
  460.     logger -t "$LOGTAG" "Update 3.x-12 FAILED."
  461.   fi
  462. fi
  463. ###
  464.  
  465. ############################################################################
  466. ### Update 3.x-13 - 06/12/2002
  467. # Bug fixe: DHCP now works!
  468. # Enhancement: Squid: upload allowed up to 3Mb
  469. # Obsoletes :
  470. ############################################################################
  471.  
  472. if [ ! \( -e $UPDDIR/3.x-13 \) ]
  473. then
  474.  
  475.   # Download the files
  476.   cd /tmp
  477.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-13.tgz .
  478.  
  479.   # Do the things...
  480.   tar zxf upd-3.x-13.tgz --exclude usr/local/ --directory /
  481.   RC=$?
  482.   /usr/local/sbin/permslis
  483.  
  484.   # Check and finish
  485.   if [ $RC = 0 ]
  486.   then
  487.  
  488.     /usr/local/sbin/mkfilters
  489.     /usr/local/sbin/mksquidconf
  490.     killall -HUP squid
  491.  
  492.     touch $UPDDIR/3.x-13
  493.     logger -t "$LOGTAG" "Update 3.x-13 Done."
  494.   else
  495.     logger -t "$LOGTAG" "Update 3.x-13 FAILED."
  496.   fi
  497. fi
  498. ###
  499.  
  500. ############################################################################
  501. ### Update 3.x-14 - 06/12/2002
  502. # Security: https://rhn.redhat.com/errata/RHSA-2002-196.html
  503. # Obsoletes :
  504. ############################################################################
  505.  
  506. if [ ! \( -e $UPDDIR/3.x-14 \) ]
  507. then
  508.  
  509.   # Download the files
  510.   cd /tmp
  511.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/xinetd-2.3.7-4.7x.i386.rpm .
  512.  
  513.   # Do the things...
  514.   rpm -F xinetd-2.3.7-4.7x.i386.rpm
  515.   RC1=$?
  516.  
  517.   # Check and finish
  518.   if [ $RC1 = 0 ]
  519.   then
  520.     /etc/rc.d/init.d/xinetd stop
  521.     sleep 10
  522.     /etc/rc.d/init.d/xinetd start
  523.     touch $UPDDIR/3.x-14
  524.     logger -t "$LOGTAG" "Update 3.x-14 Done."
  525.   else
  526.     logger -t "$LOGTAG" "Update 3.x-14 FAILED."
  527.   fi
  528. fi
  529. ###
  530.  
  531. ############################################################################
  532. ### Update 3.x-15 - 11/12/2002
  533. # Bug fix: Port forwarding (VNC) was not working since 3.x-12
  534. # SECURITY: Firewall rules where also applied on in->out forwarding
  535. # Obsoletes :
  536. ############################################################################
  537.  
  538. if [ ! \( -e $UPDDIR/3.x-15 \) ]
  539. then
  540.  
  541.   # Download the files
  542.   cd /tmp
  543.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-15.tgz .
  544.  
  545.   # Do the things...
  546.   tar zxf upd-3.x-15.tgz --exclude usr/local/ --directory /
  547.   RC=$?
  548.   /usr/local/sbin/permslis
  549.  
  550.   # Check and finish
  551.   if [ $RC = 0 ]
  552.   then
  553.  
  554.     /usr/local/sbin/mkfilters
  555.  
  556.     touch $UPDDIR/3.x-15
  557.     logger -t "$LOGTAG" "Update 3.x-15 Done."
  558.   else
  559.     logger -t "$LOGTAG" "Update 3.x-15 FAILED."
  560.   fi
  561. fi
  562. ###
  563.  
  564. ############################################################################
  565. ### Update 3.x-16 - 11/12/2002
  566. # Security: https://rhn.redhat.com/errata/RHSA-2002-229.html
  567. # Obsoletes : 
  568. ############################################################################
  569.  
  570. if [ ! \( -e $UPDDIR/3.x-16 \) ]
  571. then
  572.  
  573.   # Download the files
  574.   cd /tmp
  575.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/wget-1.8.2-4.73.i386.rpm .
  576.  
  577.   # Do the things...
  578.   rpm -F wget-1.8.2-4.73.i386.rpm
  579.   RC1=$?
  580.  
  581.   # Check and finish
  582.   if [ $RC1 = 0 ]
  583.   then
  584.     touch $UPDDIR/3.x-16
  585.     logger -t "$LOGTAG" "Update 3.x-16 Done."
  586.   else
  587.     logger -t "$LOGTAG" "Update 3.x-16 FAILED."
  588.   fi
  589. fi
  590. ###
  591.  
  592. ############################################################################
  593. ### Update 3.x-17 - 17/12/2002
  594. # Little bugfix: Debug mode was left on into mkfilters
  595. # Enhancement: You can now create a /usr/local/etc/post-mkfilters.sh script
  596. # if you want to customize some things after netfilter programming is
  597. # done by the SLIS.
  598. # Obsoletes :
  599. ############################################################################
  600.  
  601. if [ ! \( -e $UPDDIR/3.x-17 \) ]
  602. then
  603.  
  604.   # Download the files
  605.   cd /tmp
  606.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-17.tgz .
  607.  
  608.   # Do the things...
  609.   tar zxf upd-3.x-17.tgz --exclude usr/local/ --directory /
  610.   RC=$?
  611.   /usr/local/sbin/permslis
  612.  
  613.   # Check and finish
  614.   if [ $RC = 0 ]
  615.   then
  616.  
  617.     /usr/local/sbin/mkfilters
  618.  
  619.     touch $UPDDIR/3.x-17
  620.     logger -t "$LOGTAG" "Update 3.x-17 Done."
  621.   else
  622.     logger -t "$LOGTAG" "Update 3.x-17 FAILED."
  623.   fi
  624. fi
  625. ###
  626.  
  627. ############################################################################
  628. ### Update 3.x-18 - 17/12/2002
  629. # Security: Apache update: https://rhn.redhat.com/errata/RHSA-2002-222.html
  630. # Obsoletes :
  631. ############################################################################
  632.  
  633. if [ ! \( -e $UPDDIR/3.x-18 \) ]
  634. then
  635.  
  636.   # Download the files
  637.   cd /tmp
  638.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/apache-1.3.27-2.i386.rpm .
  639.  
  640.   # Do the things...
  641.   if [ -e /home/httpd/html/index.html ]
  642.   then
  643.     INDEX_EXISTS=1
  644.   else
  645.     INDEX_EXISTS=0
  646.   fi
  647.   rpm -F apache-1.3.27-2.i386.rpm
  648.   RC1=$?
  649.  
  650.   # Check and finish
  651.   if [ $RC1 = 0 ]
  652.   then
  653.     # This is to prevent the apache test page from appearing instead of
  654.     # an already index.php or index.htm present page:
  655.     if [ $INDEX_EXISTS = 0 ]
  656.     then
  657.       mv -f /home/httpd/html/index.html /home/httpd/html/index.html.rpm 2>/dev/null
  658.     fi
  659.  
  660.     /etc/rc.d/init.d/httpd stop > /dev/null
  661.     killall httpd 2> /dev/null
  662.     sleep 5
  663.     killall -9 httpd 2> /dev/null
  664.     sleep 2
  665.     /etc/rc.d/init.d/httpd start > /dev/null
  666.     export PHPRC="/etc/hadmin";/usr/sbin/httpd -f /etc/hadmin/conf/httpd.conf;export -n PHPRC
  667.     export PHPRC=/etc/hadmin;/usr/sbin/httpd -f /etc/hadmin/clientgw/conf/httpd.conf;export -n PHPRC
  668.  
  669.     touch $UPDDIR/3.x-18
  670.     logger -t "$LOGTAG" "Update 3.x-18 Done."
  671.   else
  672.     logger -t "$LOGTAG" "Update 3.x-18 FAILED."
  673.   fi
  674. fi
  675. ###
  676.  
  677. ############################################################################
  678. ### Update 3.x-19 - 15/12/2002
  679. # MRTG
  680. # Obsoletes :
  681. ############################################################################
  682.  
  683. if [ ! \( -e $UPDDIR/3.x-19 \) ]
  684.   then
  685.  
  686.   # Download the files
  687.   cd /tmp
  688.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/mrtg-2.9.17-3.i386.rpm .
  689.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-19.tgz .
  690.  
  691.   # Do the things...
  692.   rpm -U mrtg-2.9.17-3.i386.rpm
  693.   RC1=$?
  694.   tar xfz upd-3.x-19.tgz  --exclude usr/local/ --directory /
  695.   mkdir /home/hadmin/html/mrtg
  696.  
  697.   /usr/local/sbin/permslis
  698.  
  699.   # Crontab
  700.   /usr/bin/crontab -l > /tmp/cron.tmp
  701.   if [ "`grep -i mrtg /tmp/cron.tmp`" = "" ]
  702.   then
  703.     echo -e  "\n # MRTG" >> /tmp/cron.tmp
  704.     echo "*/5 * * * * /usr/bin/mrtg /etc/mrtg/mrtg.cfg >> /var/log/mrtg.log 2>&1" >> /tmp/cron.tmp
  705.     /usr/bin/crontab /tmp/cron.tmp
  706.   fi
  707.   rm -f /tmp/cron.tmp
  708.  
  709.   # Check and finish
  710.   if [ $RC1 = 0 ]
  711.   then
  712.     touch $UPDDIR/3.x-19
  713.     logger -t "$LOGTAG" "Update 3.x-19 Done."
  714.   else
  715.     logger -t "$LOGTAG" "Update 3.x-19 FAILED."
  716.   fi
  717. fi
  718. ###
  719.  
  720. ############################################################################
  721. ### Update 3.x-19b - 15/12/2002
  722. # Bug fixes for 3.x-19
  723. # Obsoletes :
  724. ############################################################################
  725.  
  726. if [ ! \( -e $UPDDIR/3.x-19b \) ]
  727.   then
  728.  
  729.   # Download the files
  730.   cd /tmp
  731.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-19b.tgz .
  732.  
  733.   # Do the things...
  734.   tar xfz upd-3.x-19b.tgz --directory /
  735.   RC1=$?
  736.  
  737.   /usr/local/sbin/permslis
  738.  
  739.   # Crontab
  740.   perl -pi -e 's,0-59/5.*root /usr/bin/mrtg.*,,' /etc/crontab
  741.  
  742.   # Check and finish
  743.   if [ $RC1 = 0 ]
  744.   then
  745.     touch $UPDDIR/3.x-19b
  746.     logger -t "$LOGTAG" "Update 3.x-19b Done."
  747.   else
  748.     logger -t "$LOGTAG" "Update 3.x-19b FAILED."
  749.   fi
  750. fi
  751. ###
  752.  
  753. ############################################################################
  754. ### Update 3.x-20 - 18/12/2002
  755. # Security: https://rhn.redhat.com/errata/RHSA-2002-293.html
  756. # Obsoletes : a part of 3.x-09
  757. ############################################################################
  758.  
  759. if [ ! \( -e $UPDDIR/3.x-20 \) ]
  760. then
  761.  
  762.   # Download the files
  763.   cd /tmp
  764.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/fetchmail-5.9.0-21.7.3.i386.rpm .
  765.  
  766.   # Do the things...
  767.   rpm -F fetchmail-5.9.0-21.7.3.i386.rpm
  768.   RC1=$?
  769.  
  770.   # Check and finish
  771.   if [ $RC1 = 0 ]
  772.   then
  773.     touch $UPDDIR/3.x-20
  774.     logger -t "$LOGTAG" "Update 3.x-20 Done."
  775.   else
  776.     logger -t "$LOGTAG" "Update 3.x-20 FAILED."
  777.   fi
  778. fi
  779. ###
  780.  
  781. ############################################################################
  782. ### Update 3.x-21 - 19/12/2002
  783. # Milter installation, with an interface into hadmin
  784. # Thanx to Olivier Le-Cam and Francois Hisquin (Academie de Versailles)
  785. # Obsoletes :
  786. ############################################################################
  787.  
  788.  
  789. if [ ! \( -e $UPDDIR/3.x-21 \) ]
  790. then
  791.         # Download the files
  792.         cd /tmp
  793.         rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-21.tgz .
  794.         rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/db4-4.0.14-14.i386.rpm .
  795.         rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/sendmail-8.12.5-7.i386.rpm .
  796.         rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/sendmail-devel-8.12.5-7.i386.rpm .
  797.  
  798.         # Do the staff
  799.         tar xfz upd-3.x-21.tgz --exclude usr/local/ --directory /
  800.         RC1=$?
  801.  
  802.         # Sendmail.cf must be renamed into /etc/mail
  803.         cp /etc/sendmail.cf /etc/mail/sendmail_norm.cf
  804.         cp /etc/mail/sendmail_norm.cf /etc/mail/sendmail_smilter.cf
  805.  
  806.         # Install the RedHat 8.0 sendmail RPM with does really support the milter feature
  807.         # db4 and sendmail-devel are also needed
  808.         /etc/rc.d/init.d/sendmail stop
  809.         rpm -i db4-4.0.14-14.i386.rpm
  810.         RC2=$?
  811.         rpm -F sendmail-8.12.5-7.i386.rpm \
  812.                sendmail-devel-8.12.5-7.i386.rpm
  813.         RC3=$?
  814.         # Check and finish
  815.         if [ $RC1 = 0 -a $RC2 = 0 -a $RC3 = 0 ]
  816.         then
  817.                 rm -f /etc/mail/sendmail.cf
  818.                 cp /etc/mail/sendmail_norm.cf /etc/mail/sendmail.cf
  819.  
  820.                 # Patch the original sendmail.cf with the milter stuff
  821.                 /usr/bin/patch /etc/mail/sendmail_smilter.cf /tmp/sendmail_smilter.cf.patch
  822.  
  823.                 # Configure smilter.conf according to the SLIS settings
  824.                 /usr/local/sbin/mksmilterconf
  825.  
  826.                 # Check and ajust perms
  827.                 /usr/local/sbin/init_options -u 2> /dev/null
  828.                 /usr/local/sbin/permslis
  829.                 /usr/local/sbin/valid
  830.  
  831.                 # Install and run smilterd
  832.                 ln -s -f /etc/rc.d/init.d/smilter /etc/rc.d/rc3.d/S99smilter
  833.                 ln -s -f /etc/mail/sendmail.cf /etc/sendmail.cf
  834.                 /etc/rc.d/init.d/smilter start
  835.                 touch $UPDDIR/3.x-21
  836.                 logger -t "$LOGTAG" "Update 3.x-21 Done."
  837.         else
  838.                 logger -t "$LOGTAG" "Update 3.x-21 FAILED."
  839.         fi
  840.         /etc/rc.d/init.d/sendmail start
  841.  
  842. fi
  843. ###
  844.  
  845.  
  846. ############################################################################
  847. ### Update 3.x-24 - 16/01/2003
  848. # Security: https://rhn.redhat.com/errata/RHSA-2002-295.html
  849. # Obsoletes :
  850. ############################################################################
  851.  
  852. if [ ! \( -e $UPDDIR/3.x-24 \) ]
  853. then
  854.  
  855.   # Download the files
  856.   cd /tmp
  857.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/cups-libs-1.1.14-15.2.i386.rpm .
  858.  
  859.   # Do the things...
  860.   rpm -F cups-libs-1.1.14-15.2.i386.rpm
  861.   RC1=$?
  862.  
  863.   # Check and finish
  864.   if [ $RC1 = 0 ]
  865.   then
  866.  
  867.     touch $UPDDIR/3.x-24
  868.     logger -t "$LOGTAG" "Update 3.x-24 Done."
  869.   else
  870.     logger -t "$LOGTAG" "Update 3.x-24 FAILED."
  871.   fi
  872. fi
  873. ###
  874.  
  875. ############################################################################
  876. ### Update 3.x-25 - 17/01/2003
  877. # Installation de SpamAssassin + Modif variable language
  878. # Thanks to "Academie de Versailles"
  879. # Obsoletes :
  880. ############################################################################
  881.  
  882. if [ ! \( -e $UPDDIR/3.x-25 \) ]
  883. then
  884.         # Download the files
  885.         cd /tmp
  886.         rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/perl-HTML-Tagset-3.03-14.i386.rpm .
  887.         rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/perl-HTML-Parser-3.26-2.i386.rpm .
  888.         rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/perl-Mail-SpamAssassin-2.43-3.i386.rpm .
  889.         rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/spamassassin-2.43-3.i386.rpm .
  890.         rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x.25.tgz .
  891.  
  892.  
  893.         # Do the staff
  894.         tar xfz upd-3.x.25.tgz --directory /
  895.         RC1=$?
  896.  
  897.           # Install the spamassassin RPMs
  898.           rpm -i perl-HTML-Tagset-3.03-14.i386.rpm      \
  899.                perl-HTML-Parser-3.26-2.i386.rpm       \
  900.                perl-Mail-SpamAssassin-2.43-3.i386.rpm \
  901.                spamassassin-2.43-3.i386.rpm
  902.           RC2=$?
  903.  
  904.           # Check and ajust perms
  905.           /usr/local/sbin/init_options -u 2> /dev/null
  906.           /usr/local/sbin/permslis
  907.           /usr/local/sbin/valid
  908.  
  909.           if [ $RC1 = 0 -a $RC2 = 0 ]
  910.         then
  911.                     # Run spamassassin
  912.                     /etc/rc.d/init.d/spamassassin start
  913.                 touch $UPDDIR/3.x-25
  914.                 logger -t "$LOGTAG" "Update 3.x-25 Done."
  915.         else
  916.                 logger -t "$LOGTAG" "Update 3.x-25 FAILED."
  917.         fi
  918.  
  919. fi
  920.  
  921.  
  922. ############################################################################
  923. ### Update 3.x-26 - 11/02/2003
  924. # SECURITY:
  925. # https://rhn.redhat.com/errata/RHSA-2003-006.html
  926. # https://rhn.redhat.com/errata/RHSA-2002-297.html
  927. # https://rhn.redhat.com/errata/RHSA-2003-020.html
  928. # https://rhn.redhat.com/errata/RHSA-2003-040.html
  929. # Obsoletes :
  930. ############################################################################
  931.  
  932. if [ ! \( -e $UPDDIR/3.x-26 \) ]
  933. then
  934.  
  935.   # Download the files
  936.   cd /tmp
  937.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/libpng-1.0.14-0.7x.4.i386.rpm .
  938.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/vim-common-6.1-18.7x.2.i386.rpm .
  939.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/vim-minimal-6.1-18.7x.2.i386.rpm .
  940.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/krb5-libs-1.2.4-4.i386.rpm .
  941.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/openldap-2.0.27-2.7.3.i386.rpm .
  942.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/openldap-clients-2.0.27-2.7.3.i386.rpm .
  943.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/openldap-servers-2.0.27-2.7.3.i386.rpm .
  944.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/openldap12-1.2.13-8.i386.rpm .
  945.  
  946.   # Do the things...
  947.   rpm -F libpng-1.0.14-0.7x.4.i386.rpm vim-common-6.1-18.7x.2.i386.rpm \
  948.          vim-minimal-6.1-18.7x.2.i386.rpm krb5-libs-1.2.4-4.i386.rpm \
  949.          openldap-2.0.27-2.7.3.i386.rpm openldap-clients-2.0.27-2.7.3.i386.rpm \
  950.          openldap-servers-2.0.27-2.7.3.i386.rpm openldap12-1.2.13-8.i386.rpm
  951.   RC1=$?
  952.  
  953.   # Check and finish
  954.   if [ $RC1 = 0 ]
  955.   then
  956.  
  957.     touch $UPDDIR/3.x-26
  958.     logger -t "$LOGTAG" "Update 3.x-26 Done."
  959.   else
  960.     logger -t "$LOGTAG" "Update 3.x-26 FAILED."
  961.   fi
  962. fi
  963. ###
  964.  
  965. ############################################################################
  966. ### Update 3.x-27 - 12/02/2003
  967. # Bug fix: restore from 2.x/3.x was bugged
  968. # restore script, valid script and badlogin table are updated so that users
  969. # are not always banned when they were already existing into the system
  970. # Obsoletes :
  971. ############################################################################
  972.  
  973. if [ ! \( -e $UPDDIR/3.x-27 \) ]
  974. then
  975.  
  976.   # Download the files
  977.   cd /tmp
  978.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-27.tgz .
  979.  
  980.   # Do the things...
  981.   tar zxf upd-3.x-27.tgz --exclude usr/local/ --directory /
  982.   RC=$?
  983.   /usr/local/sbin/permslis
  984.  
  985.   # Check and finish
  986.   if [ $RC = 0 ]
  987.   then
  988.  
  989.     . /home/hadmin/setup.data
  990.     export PGPASSWORD=`grep "ADMINPASS=" /home/hadmin/html/config_pgsql.inc.php |cut -d\" -f2`
  991.     export PGUSER=`grep "ADMINUSER=" /home/hadmin/html/config_pgsql.inc.php |cut -d\" -f2`
  992.     PGSQL_SERVER=`grep "PGSQL_SERVER=" /home/hadmin/html/config_pgsql.inc.php |cut -d\" -f2`
  993.     BASE_HADMIN=`grep "BASE_HADMIN=" /home/hadmin/html/config_pgsql.inc.php |cut -d\" -f2`
  994.     SQL_QUERY="psql -h $PGSQL_SERVER $BASE_HADMIN -tqc"
  995.  
  996.     psql -f /tmp/badlogin.sql hadmin >/dev/null 2>&1
  997.     $SQL_QUERY "INSERT INTO badlogin (\"nom\") VALUES ('$MAINT_USER')"
  998.     $SQL_QUERY "INSERT INTO badlogin (\"nom\") VALUES ('$MAINT_USER2')"
  999.  
  1000.     touch $UPDDIR/3.x-27
  1001.     logger -t "$LOGTAG" "Update 3.x-27 Done."
  1002.   else
  1003.     logger -t "$LOGTAG" "Update 3.x-27 FAILED."
  1004.   fi
  1005. fi
  1006. ###
  1007.  
  1008. ############################################################################
  1009. ### Update 3.x-28 - 21/02/2003
  1010. # SECURITY:
  1011. # https://rhn.redhat.com/errata/RHSA-2003-029.html
  1012. # https://rhn.redhat.com/errata/RHSA-2003-035.html
  1013. # https://rhn.redhat.com/errata/RHSA-2003-015.html
  1014. # https://rhn.redhat.com/errata/RHSA-2003-057.html
  1015. # Obsoletes :
  1016. ############################################################################
  1017.  
  1018. if [ ! \( -e $UPDDIR/3.x-28 \) ]
  1019. then
  1020.  
  1021.   # Download the files
  1022.   cd /tmp
  1023.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/lynx-2.8.4-18.1.i386.rpm .
  1024.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/pam-0.75-46.7.3.i386.rpm .
  1025.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/fileutils-4.1-10.1.i386.rpm .
  1026.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/shadow-utils-20000902-9.7.i386.rpm .
  1027.  
  1028.   # Do the things...
  1029.   rpm -F lynx-2.8.4-18.1.i386.rpm pam-0.75-46.7.3.i386.rpm \
  1030.          fileutils-4.1-10.1.i386.rpm shadow-utils-20000902-9.7.i386.rpm
  1031.   RC1=$?
  1032.  
  1033.   # Check and finish
  1034.   if [ $RC1 = 0 ]
  1035.   then
  1036.  
  1037.     touch $UPDDIR/3.x-28
  1038.     logger -t "$LOGTAG" "Update 3.x-28 Done."
  1039.   else
  1040.     logger -t "$LOGTAG" "Update 3.x-28 FAILED."
  1041.   fi
  1042. fi
  1043. ###
  1044.  
  1045. ############################################################################
  1046. ### Update 3.x-30 - 19/03/2003
  1047. # SECURITY: File, Sendmail, Openssl
  1048. # Obsoletes : Updated for space optimization 2003-11-25
  1049. ############################################################################
  1050.  
  1051. if [ ! \( -e $UPDDIR/3.x-30 \) ]
  1052. then
  1053.  
  1054.   # Download the files
  1055.   cd /tmp
  1056.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/file-3.39-8.7x.i386.rpm .
  1057.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/sendmail-8.11.6-23.73.i386.rpm .
  1058.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/openssl-0.9.6b-35.7.i386.rpm .
  1059.  
  1060.   # Do the things...
  1061.   rpm -F file-3.39-8.7x.i386.rpm \
  1062.          sendmail-8.11.6-23.73.i386.rpm \
  1063.          openssl-0.9.6b-35.7.i386.rpm
  1064.   RC1=$?
  1065.  
  1066.   # Check and finish
  1067.   if [ $RC1 = 0 ]
  1068.   then
  1069.  
  1070.     touch $UPDDIR/3.x-30
  1071.     logger -t "$LOGTAG" "Update 3.x-30 Done."
  1072.   else
  1073.     logger -t "$LOGTAG" "Update 3.x-30 FAILED."
  1074.   fi
  1075. fi
  1076. ###
  1077.  
  1078.  
  1079. ############################################################################
  1080. ### Update 3.x-34 - 01/04/2003
  1081. # SECURITY: Sendmail (This is the RH 8.0 update compiled for 7.3)
  1082. #           Krb-libs
  1083. # Obsoletes : 3.x-32
  1084. ############################################################################
  1085.  
  1086. if [ ! \( -e $UPDDIR/3.x-34 \) ]
  1087. then
  1088.  
  1089.   # Download the files
  1090.   cd /tmp
  1091.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/sendmail-8.12.8-5.80.i386.rpm .
  1092.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/krb5-libs-1.2.4-11.i386.rpm .
  1093.  
  1094.  
  1095.   # Do the things...
  1096.   rpm -F sendmail-8.12.8-5.80.i386.rpm krb5-libs-1.2.4-11.i386.rpm
  1097.   RC1=$?
  1098.  
  1099.   # Check and finish
  1100.   if [ $RC1 = 0 ]
  1101.   then
  1102.  
  1103.     touch $UPDDIR/3.x-34
  1104.     logger -t "$LOGTAG" "Update 3.x-34 Done."
  1105.   else
  1106.     logger -t "$LOGTAG" "Update 3.x-34 FAILED."
  1107.   fi
  1108. fi
  1109. ###
  1110.  
  1111. ############################################################################
  1112. ### Update 3.x-35 - 01/04/2003
  1113. # Bug fix: NTP now works !
  1114. # Obsolletes :
  1115. ############################################################################
  1116.  
  1117. if [ ! \( -e $UPDDIR/3.x-35 \) ]
  1118. then
  1119.  
  1120.   # Download the files
  1121.   cd /tmp
  1122.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-35.tgz .
  1123.  
  1124.   # Do the things....
  1125.   tar zxf upd-3.x-35.tgz --directory /
  1126.   RC=$?
  1127.   /usr/local/sbin/permslis
  1128.  
  1129.   # Check and finish
  1130.   if [ $RC = 0 ]
  1131.   then
  1132.         /usr/local/sbin/mkntpconf
  1133.         /etc/rc.d/init.d/ntpd restart
  1134.  
  1135.   touch $UPDDIR/3.x-35
  1136.   logger -t "$LOGTAG" "Update 3.x-35 Done."
  1137.  else
  1138.   logger -t "$LOGTAG" "Update 3.x-35 FAILED."
  1139.  fi
  1140. fi
  1141. ###
  1142.  
  1143.  
  1144. ############################################################################
  1145. ### Update 3.x-37 - 02/04/2003
  1146. # Bug fix: postgresql sometimes refuses to start
  1147. # Obsoletes :
  1148. ############################################################################
  1149.  
  1150. if [ ! \( -e $UPDDIR/3.x-37 \) ]
  1151. then
  1152.  
  1153.   # Do the things...
  1154.   perl -pi -e 's,rm -f /var/run/postmaster.pid,rm -f  /var/run/postmaster.pid;rm -f /var/lib/pgsql/data/postmaster.pid,' /etc/rc.d/init.d/postgresql
  1155.  
  1156.   touch $UPDDIR/3.x-37
  1157.   logger -t "$LOGTAG" "Update 3.x-37 Done."
  1158. fi
  1159. ###
  1160.  
  1161. ############################################################################
  1162. ### Update 3.x-38 - 03/04/2003
  1163. # Enhancements: Interface update:
  1164. #  - Deletion of all users is now possible in 2 clicks
  1165. #  - Deletion of users from the result of a search is now possible
  1166. #  - Groups affectations can be imported
  1167. #  - A new bottom frame shows the status of the SLIS 
  1168. # Obsolletes :
  1169. ############################################################################
  1170.  
  1171. if [ ! \( -e $UPDDIR/3.x-38 \) ]
  1172. then
  1173.  
  1174.   # Download the files
  1175.   cd /tmp
  1176.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-38.tgz .
  1177.  
  1178.   # Do the things....
  1179.   tar zxf upd-3.x-38.tgz --directory /
  1180.   RC=$?
  1181.   /usr/local/sbin/permslis
  1182.  
  1183.   # Check and finish
  1184.   if [ $RC = 0 ]
  1185.   then
  1186.     mv -f /home/hadmin/html/index.html /home/hadmin/html/index.html.old
  1187.     touch $UPDDIR/3.x-38
  1188.     logger -t "$LOGTAG" "Update 3.x-38 Done."
  1189.   else
  1190.     logger -t "$LOGTAG" "Update 3.x-38 FAILED."
  1191.   fi
  1192. fi
  1193. ###
  1194.  
  1195. ############################################################################
  1196. ### Update 3.x-39 - 07/04/2003
  1197. # Enhancement: Add of /usr/local/sbin/init_routerconfig
  1198. #   This script is intended to be called as a login shell. You can create
  1199. #   a user for your mainteners like this, in an academy update:
  1200. #     useradd -c "Automatic router configuration" \
  1201. #      -s /usr/local/sbin/init_routerconfig \
  1202. #      -p "\$3\$amCygwuU\$sweffqsdljE99dl34" confr
  1203. #     usermod -G uucp,hadmin confr
  1204. #   This script takes values from DKS 3 which is still in devel status
  1205. # Obsolletes :
  1206. ############################################################################
  1207.  
  1208. if [ ! \( -e $UPDDIR/3.x-39 \) ]
  1209. then
  1210.  
  1211.   # Download the files
  1212.   cd /tmp
  1213.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-39.tgz .
  1214.  
  1215.   # Do the things....
  1216.   tar zxf upd-3.x-39.tgz --directory /
  1217.   RC=$?
  1218.   /usr/local/sbin/permslis
  1219.  
  1220.   # Check and finish
  1221.   if [ $RC = 0 ]
  1222.   then
  1223.     touch $UPDDIR/3.x-39
  1224.     logger -t "$LOGTAG" "Update 3.x-39 Done."
  1225.   else
  1226.     logger -t "$LOGTAG" "Update 3.x-39 FAILED."
  1227.   fi
  1228. fi
  1229. ###
  1230.  
  1231.  
  1232. ############################################################################
  1233. ### Update 3.x-40 - 08/04/2003
  1234. # SECURITY: Samba
  1235. # Obsoletes : 3.x-11 3.x-31
  1236. ############################################################################
  1237.  
  1238. if [ ! \( -e $UPDDIR/3.x-40 \) ]
  1239. then
  1240.  
  1241.   # Download the files
  1242.   cd /tmp
  1243.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/samba-2.2.7-3.7.3.i386.rpm .
  1244.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/samba-common-2.2.7-3.7.3.i386.rpm .
  1245.  
  1246.  
  1247.   # Do the things...
  1248.   rpm -F samba-common-2.2.7-3.7.3.i386.rpm \
  1249.          samba-2.2.7-3.7.3.i386.rpm
  1250.   RC1=$?
  1251.  
  1252.   # Check and finish
  1253.   if [ $RC1 = 0 ]
  1254.   then
  1255.  
  1256.     /etc/rc.d/init.d/smb restart
  1257.     touch $UPDDIR/3.x-40
  1258.     logger -t "$LOGTAG" "Update 3.x-40 Done."
  1259.   else
  1260.     logger -t "$LOGTAG" "Update 3.x-40 FAILED."
  1261.   fi
  1262. fi
  1263. ###
  1264.  
  1265. ############################################################################
  1266. ### Update 3.x-41 - 11/04/2003
  1267. # Enhancement: new advanced.php and languages files 
  1268. # Obsolletes :
  1269. ############################################################################
  1270.  
  1271. if [ ! \( -e $UPDDIR/3.x-41 \) ]
  1272. then
  1273.  
  1274.   # Download the files
  1275.   cd /tmp
  1276.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-41.tgz .
  1277.  
  1278.   # Do the things....
  1279.   tar zxf upd-3.x-41.tgz --directory /
  1280.   RC=$?
  1281.   /usr/local/sbin/permslis
  1282.  
  1283.   # Check and finish
  1284.   if [ $RC = 0 ]
  1285.   then
  1286.     touch $UPDDIR/3.x-41
  1287.     logger -t "$LOGTAG" "Update 3.x-41 Done."
  1288.   else
  1289.     logger -t "$LOGTAG" "Update 3.x-41 FAILED."
  1290.   fi
  1291. fi
  1292. ###
  1293.  
  1294. ############################################################################
  1295. ### Update 3.x-42 - 14/04/2003
  1296. # Bug fixes: valid script ans lib.inc.php were not up to date because of 
  1297. # late publication of 3.x-25. Valid has been fixed for webmaster deletion/re-
  1298. # creation bug.
  1299. # Obsolletes :
  1300. ############################################################################
  1301.  
  1302. if [ ! \( -e $UPDDIR/3.x-42 \) ]
  1303. then
  1304.  
  1305.   # Download the files
  1306.   cd /tmp
  1307.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-42.tgz .
  1308.  
  1309.   # Do the things....
  1310.   tar zxf upd-3.x-42.tgz --exclude usr/local/ --directory /
  1311.   RC=$?
  1312.   /usr/local/sbin/permslis
  1313.  
  1314.   # Check and finish
  1315.   if [ $RC = 0 ]
  1316.   then
  1317.     touch $UPDDIR/3.x-42
  1318.     logger -t "$LOGTAG" "Update 3.x-42 Done."
  1319.   else
  1320.     logger -t "$LOGTAG" "Update 3.x-42 FAILED."
  1321.   fi
  1322. fi
  1323. ###
  1324.  
  1325. ############################################################################
  1326. ### Update 3.x-43 - 14/04/2003
  1327. # Bug fix: Groups are no more prefixed by a s_. The new valid script
  1328. # needs that to work efficiently.
  1329. # Obsolletes :
  1330. ############################################################################
  1331.  
  1332. if [ ! \( -e $UPDDIR/3.x-43 \) ]
  1333. then
  1334.  
  1335.   for i in `getent group |grep "^s_" |cut -f1 -d:`
  1336.   do 
  1337.     /usr/local/bin/cpu groupmod -n `echo $i |sed s/^s_//` $i
  1338.   done
  1339.   /usr/local/sbin/valid
  1340.  
  1341.   touch $UPDDIR/3.x-43
  1342.   logger -t "$LOGTAG" "Update 3.x-43 Done."
  1343. fi
  1344. ###
  1345.  
  1346.  
  1347. ############################################################################
  1348. ### Update 3.x-44 - 18/04/2003
  1349. # Enhancements: Interface update. 
  1350. # A lot of improvements (import by browsing a file, better ergonomy,
  1351. # and bug fixes) of the users interface. 
  1352. # Also a new connslogd script managing the Efficient 5861 adsl router.
  1353. # Obsolletes :
  1354. ############################################################################
  1355.  
  1356. if [ ! \( -e $UPDDIR/3.x-44 \) ]
  1357. then
  1358.  
  1359.   # Download the files
  1360.   cd /tmp
  1361.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-44.tgz .
  1362.  
  1363.   # Do the things....
  1364.   killall connslogd
  1365.   sleep 1
  1366.   tar zxf upd-3.x-44.tgz --exclude usr/local/ --directory /
  1367.   RC=$?
  1368.   /usr/local/sbin/permslis
  1369.   /usr/local/sbin/connslogd&
  1370.  
  1371.   # Check and finish
  1372.   if [ $RC = 0 ]
  1373.   then
  1374.     touch $UPDDIR/3.x-44
  1375.     logger -t "$LOGTAG" "Update 3.x-44 Done."
  1376.   else
  1377.     logger -t "$LOGTAG" "Update 3.x-44 FAILED."
  1378.   fi
  1379. fi
  1380. ###
  1381.  
  1382. ############################################################################
  1383. ### Update 3.x-46 - 17/05/2003
  1384. # SECURITY: man, mysql, tcpdump, zlib, xinetd
  1385. # Obsoletes : Updated for space optimization 2003-11-25
  1386. ############################################################################
  1387.  
  1388. if [ ! \( -e $UPDDIR/3.x-46 \) ]
  1389. then
  1390.  
  1391.   # Download the files
  1392.   cd /tmp
  1393.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/man-1.5j-7.7x.0.i386.rpm .
  1394.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/tcpdump-3.6.3-17.7.3.3.i386.rpm .
  1395.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/zlib-1.1.4-8.7x.i386.rpm .
  1396.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/zlib-devel-1.1.4-8.7x.i386.rpm .
  1397.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/mysql-3.23.58-1.73.i386.rpm .
  1398.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/xinetd-2.3.11-1.7x.i386.rpm .
  1399.  
  1400.   # Do the things...
  1401.   rpm -F man-1.5j-7.7x.0.i386.rpm \
  1402.          tcpdump-3.6.3-17.7.3.3.i386.rpm \
  1403.          zlib-1.1.4-8.7x.i386.rpm \
  1404.          zlib-devel-1.1.4-8.7x.i386.rpm \
  1405.          mysql-3.23.58-1.73.i386.rpm \
  1406.          xinetd-2.3.11-1.7x.i386.rpm
  1407.  
  1408.   RC1=$?
  1409.  
  1410.   # Check and finish
  1411.   if [ $RC1 = 0 ]
  1412.   then
  1413.     /etc/rc.d/init.d/xinetd stop
  1414.     sleep 10
  1415.     /etc/rc.d/init.d/xinetd start
  1416.  
  1417.     touch $UPDDIR/3.x-46
  1418.     logger -t "$LOGTAG" "Update 3.x-46 Done."
  1419.   else
  1420.     logger -t "$LOGTAG" "Update 3.x-46 FAILED."
  1421.   fi
  1422. fi
  1423. ###
  1424.  
  1425. ############################################################################
  1426. ### Update 3.x-47 - 23/05/2003
  1427. # - Bug fixes:
  1428. #    - perms on /var/spool/mail
  1429. #    - ping processes running indefinitely because of the interface checks
  1430. #    - profs and system groups where erasable
  1431. #    - others little bugs into the interface
  1432. # - Added /usr/local/sbin/modifconf and /usr/man/man1/modifconf.1
  1433. #    This script was written by Philippe Chadefaux
  1434. # - Added named into the services control pannel (Thanks again to
  1435. #    Philippe)
  1436. # Obsolletes :
  1437. ############################################################################
  1438.  
  1439. if [ ! \( -e $UPDDIR/3.x-47 \) ]
  1440. then
  1441.  
  1442.   # Download the files
  1443.   cd /tmp
  1444.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-47.tgz .
  1445.  
  1446.   # Do the things....
  1447.   tar zxf upd-3.x-47.tgz --exclude usr/local/ --directory /
  1448.   RC=$?
  1449.   /usr/local/sbin/permslis
  1450.  
  1451.   # Check and finish
  1452.   if [ $RC = 0 ]
  1453.   then
  1454.     touch $UPDDIR/3.x-47
  1455.     logger -t "$LOGTAG" "Update 3.x-47 Done."
  1456.   else
  1457.     logger -t "$LOGTAG" "Update 3.x-47 FAILED."
  1458.   fi
  1459. fi
  1460. ###
  1461.  
  1462. ############################################################################
  1463. ### Update 3.x-48 - 26/05/2003
  1464. # Bug fix: smarter bas.php (some "-w 30" where still missing and added a
  1465. # test on sendmail mode: if it is background, then we can do the ping test)
  1466. # Obsolletes :
  1467. ############################################################################
  1468.  
  1469. if [ ! \( -e $UPDDIR/3.x-48 \) ]
  1470. then
  1471.  
  1472.   # Download the files
  1473.   cd /tmp
  1474.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-48.tgz .
  1475.  
  1476.   # Do the things....
  1477.   tar zxf upd-3.x-48.tgz --exclude usr/local/ --directory /
  1478.   RC=$?
  1479.   /usr/local/sbin/permslis
  1480.  
  1481.   # Check and finish
  1482.   if [ $RC = 0 ]
  1483.   then
  1484.     touch $UPDDIR/3.x-48
  1485.     logger -t "$LOGTAG" "Update 3.x-48 Done."
  1486.   else
  1487.     logger -t "$LOGTAG" "Update 3.x-48 FAILED."
  1488.   fi
  1489. fi
  1490. ###
  1491.  
  1492. ############################################################################
  1493. ### Update 3.x-49 - 27/05/2003
  1494. # Smarter slis_update script. It tests the connection to the rsync
  1495. # host before starting the updates.
  1496. # Warning! This update needs TESTFILES.* to be in place, not only upd-3.x-49.tgz!
  1497. # Obsolletes :
  1498. ############################################################################
  1499.  
  1500. if [ ! \( -e $UPDDIR/3.x-49 \) ]
  1501. then
  1502.  
  1503.   # Download the files
  1504.   cd /tmp
  1505.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-49.tgz .
  1506.  
  1507.   # Do the things....
  1508.   tar zxf upd-3.x-49.tgz
  1509.   RC=$?
  1510.  
  1511.   # Check and finish
  1512.   if [ $RC = 0 ]
  1513.   then
  1514.     echo "mv -f /tmp/slis_update_3_1.bash /usr/local/sbin/slis_update" | at now + 10 minutes
  1515.     touch $UPDDIR/3.x-49
  1516.     logger -t "$LOGTAG" "Update 3.x-49 Done."
  1517.   else
  1518.     logger -t "$LOGTAG" "Update 3.x-49 FAILED."
  1519.   fi
  1520. fi
  1521. ###
  1522.  
  1523. ############################################################################
  1524. ### Update 3.x-50 - 6/06/2003
  1525. # Enhancements: Interface update.
  1526. # ImplΘmentation de la gestion du DNS - Thanks to Versailles
  1527. # Obsoletes :
  1528. ############################################################################
  1529.  
  1530. if [ ! \( -e $UPDDIR/3.x-50 \) ]
  1531. then
  1532.  
  1533.   # Download the files
  1534.   cd /tmp
  1535.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-50.tgz .
  1536.  
  1537.   # Do the things....
  1538.   sleep 1
  1539.   # test que postgresql tourne
  1540.   if [ "`ps ax | grep postgres`" = "" ]
  1541.   then
  1542.     logger -t "$LOGTAG" "Update 3.x-50 FAILED."
  1543.   else
  1544.     tar zxf upd-3.x-50.tgz --directory /
  1545.     #test de rΘussite
  1546.     RC=$?
  1547.     # Check and finish
  1548.     if [ $RC = 0 ]
  1549.     then
  1550.       /usr/bin/php /home/hadmin/html/dns/sql.php
  1551.       RC=$?
  1552.       # Check and finish
  1553.       if [ $RC = 0 ]
  1554.       then
  1555.         touch $UPDDIR/3.x-50
  1556.         logger -t "$LOGTAG" "Update 3.x-50 Done."
  1557.       else
  1558.         logger -t "$LOGTAG" "Update 3.x-50 FAILED."
  1559.       fi
  1560.     else
  1561.       logger -t "$LOGTAG" "Update 3.x-50 FAILED."
  1562.     fi
  1563.   fi
  1564.  
  1565. fi
  1566. ###
  1567.  
  1568. ############################################################################
  1569. # Update 3.x-51 - 10/06/2003
  1570. # Bug fixes in the mail filter module:
  1571. #  - root can post to anywhere
  1572. #  - a cosmetic problem in the mail filter administration interface
  1573. # Obsolletes :
  1574. ############################################################################
  1575.  
  1576. if [ ! \( -e $UPDDIR/3.x-51 \) ]
  1577. then
  1578.     # Download the files
  1579.     cd /tmp
  1580.     rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-51.tgz .
  1581.  
  1582.     # Stop the smilter daemon
  1583.     /etc/rc.d/init.d/smilter stop
  1584.  
  1585.     # Do the things ...
  1586.     tar xfz upd-3.x-51.tgz --directory /
  1587.     RC=$?
  1588.     /usr/local/sbin/permslis
  1589.  
  1590.     # Start again smilterd
  1591.     /etc/rc.d/init.d/smilter start
  1592.  
  1593.     # Check and finish
  1594.     if [ $RC = 0 ]
  1595.     then
  1596.         touch $UPDDIR/3.x-51
  1597.         logger -t "$LOGTAG" "Update 3.x-51 Done."
  1598.     else
  1599.         logger -t "$LOGTAG" "Update 3.x-51 FAILED."
  1600.     fi
  1601. fi
  1602. ###
  1603.  
  1604. ############################################################################
  1605. ### Update 3.x-53 - 16/06/2003
  1606. # Bug fixes:
  1607. # - Accentuated strings where not cleaned into aliases
  1608. # - Accentuated strings are now utf8 encoded into the ldap server
  1609. # - Givenname attribute now managed into ldap server
  1610. # - Primary group listed into the "groups ou" branch of the ldap server
  1611. # Enhancement:
  1612. # - Aliases can now be listed and edited directly
  1613. #
  1614. # Obsolletes :
  1615. ############################################################################
  1616.  
  1617. if [ ! \( -e $UPDDIR/3.x-53 \) ]
  1618. then
  1619.  
  1620.   # Download the files
  1621.   cd /tmp
  1622.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-53.tgz .
  1623.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/perl-Unicode-String.tgz .
  1624.  
  1625.   # Do the things....
  1626.   tar zxf perl-Unicode-String.tgz --directory /
  1627.   RC1=$?
  1628.   tar zxf upd-3.x-53.tgz --exclude usr/local/ --directory /
  1629.   RC2=$?
  1630.   /usr/local/sbin/permslis
  1631.  
  1632. ##Do this if you want to update the ldap server with the new behaviors:
  1633. # export PGPASSWORD=`grep POSTGRESPASS /home/hadmin/html/config_pgsql.inc.php|cut -d\" -f2`
  1634. # export PGUSER=postgres
  1635. # psql -tqc "update users set tovalid='t',modif='t';" hadmin
  1636. # psql -tqc "update groups set tovalid='t',modif='t';" hadmin
  1637. # /usr/local/sbin/valid
  1638. ## "No such attribute" messages into syslog are "normal"
  1639.  
  1640.   # Check and finish
  1641.   if [ $RC1 = 0 -a $RC2 = 0 ]
  1642.   then
  1643.     touch $UPDDIR/3.x-53
  1644.     logger -t "$LOGTAG" "Update 3.x-53 Done."
  1645.   else
  1646.     logger -t "$LOGTAG" "Update 3.x-53 FAILED."
  1647.   fi
  1648. fi
  1649. ###
  1650.  
  1651. ############################################################################
  1652. ### Update 3.x-50b - 27/05/2003
  1653. # Bug fix for upd-3.x-50: mknamedconf could create an invalid named.conf file
  1654. # causing loss of connectivity and then updates!
  1655. # Obsolletes :
  1656. ############################################################################
  1657.  
  1658. if [ ! \( -e $UPDDIR/3.x-50b \) ]
  1659. then
  1660.  
  1661.   # Download the files
  1662.   cd /tmp
  1663.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-50b.tgz .
  1664.  
  1665.   # Do the things....
  1666.   tar zxf upd-3.x-50b.tgz --exclude usr/local/ --directory /
  1667.   RC=$?
  1668.   /usr/local/sbin/permslis
  1669.  
  1670.   # Check and finish
  1671.   if [ $RC = 0 ]
  1672.   then
  1673.     /usr/bin/php /home/hadmin/html/dns/sql.php 2>/dev/null
  1674.     /usr/local/sbin/mknamedconf > /etc/named.conf
  1675.     /etc/rc.d/init.d/named restart;sleep 1
  1676.     touch $UPDDIR/3.x-50b
  1677.     logger -t "$LOGTAG" "Update 3.x-50b Done."
  1678.   else
  1679.     logger -t "$LOGTAG" "Update 3.x-50b FAILED."
  1680.   fi
  1681. fi
  1682. ###
  1683.  
  1684. ############################################################################
  1685. ### Update 3.x-54 - 23/06/2003
  1686. # Bug fixes:
  1687. # - Removed unusefull error messages when users removed from primary group
  1688. # - Fixed special characters encoding into webmail when requesting the shared
  1689. #   directory
  1690. # - Better compatibility with SE3
  1691. # Enhancements: 
  1692. # - Added an advanced function (experimental) to "synchronize with the LDAP
  1693. #   server"
  1694. # Obsolletes :
  1695. ############################################################################
  1696.  
  1697. if [ ! \( -e $UPDDIR/3.x-54 \) ]
  1698. then
  1699.  
  1700.   # Download the files
  1701.   cd /tmp
  1702.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-54.tgz .
  1703.  
  1704.   # Do the things....
  1705.   tar zxf upd-3.x-54.tgz --exclude usr/local/ --directory /
  1706.   RC=$?
  1707.  
  1708.   # Check and finish
  1709.   if [ $RC = 0 ]
  1710.   then
  1711.     cd /home/hadmin/html/clientgw/horde/turba/config
  1712.     patch sources.php < turba_config.patch
  1713.     /usr/local/sbin/permslis
  1714.     touch $UPDDIR/3.x-54
  1715.     logger -t "$LOGTAG" "Update 3.x-54 Done."
  1716.   else
  1717.     logger -t "$LOGTAG" "Update 3.x-54 FAILED."
  1718.   fi
  1719. fi
  1720. ###
  1721.  
  1722.  
  1723.  
  1724. ############################################################################
  1725. ### Update 3.x-55 - 07/07/2003
  1726. # Enhancements:
  1727. # - New modifconf script
  1728. # - Shemacheck set to off or samba-edu will not work
  1729. # Obsolletes :
  1730. ############################################################################
  1731.  
  1732. if [ ! \( -e $UPDDIR/3.x-55 \) ]
  1733. then
  1734.  
  1735.   # Download the files
  1736.   cd /tmp
  1737.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-55.tgz .
  1738.  
  1739.   # Do the things....
  1740.   tar zxf upd-3.x-55.tgz --exclude usr/local/ --directory /
  1741.   RC=$?
  1742.  
  1743.   # Check and finish
  1744.   if [ $RC = 0 ]
  1745.   then
  1746.     /usr/local/sbin/permslis
  1747.     cp -f /etc/openldap/slapd.conf /etc/openldap/slapd.conf.upd-55
  1748.     SC_PRESENT=`grep "schemacheck" /etc/openldap/slapd.conf`
  1749.     if [ "$SC_PRESENT" != "" ]
  1750.     then
  1751.       perl -pi -e "s/schemacheck.*/schemacheck     off/" /etc/openldap/slapd.conf
  1752.     else
  1753.       perl -pi -e "s/sizelimit/schemacheck     off\nsizelimit/" /etc/openldap/slapd.conf
  1754.     fi
  1755.     /etc/rc.d/init.d/ldap restart
  1756.     touch $UPDDIR/3.x-55
  1757.     logger -t "$LOGTAG" "Update 3.x-55 Done."
  1758.   else
  1759.     logger -t "$LOGTAG" "Update 3.x-55 FAILED."
  1760.   fi
  1761. fi
  1762. ###
  1763.  
  1764. ############################################################################
  1765. ### Update 3.x-56 - 10/07/2003
  1766. # More secure monitoring script. It tests the connection to the rsync
  1767. # host before starting the monitoring (like the update script) and may
  1768. # check the authenticity of the downloaded monitoring script if this one is
  1769. # signed. The public key of the rsync host is downloaded on the first time
  1770. # and keeped forever for checking on the next times.
  1771. # Warning! This update needs TESTFILES.* to be in place, not only upd-3.x-56.tgz!
  1772. # Obsolletes :
  1773. ############################################################################
  1774.  
  1775. if [ ! \( -e $UPDDIR/3.x-56 \) ]
  1776. then
  1777.  
  1778.   # Download the files
  1779.   cd /tmp
  1780.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-56.tgz .
  1781.  
  1782.   # Do the things....
  1783.   tar zxf upd-3.x-56.tgz --exclude usr/local/ --directory /
  1784.   RC=$?
  1785.  
  1786.   # Check and finish
  1787.   if [ $RC = 0 ]
  1788.   then
  1789.     touch $UPDDIR/3.x-56
  1790.     logger -t "$LOGTAG" "Update 3.x-56 Done."
  1791.   else
  1792.     logger -t "$LOGTAG" "Update 3.x-56 FAILED."
  1793.   fi
  1794. fi
  1795. ###
  1796.  
  1797. ############################################################################
  1798. ### Update 3.x-57 - 11/07/2003
  1799. # BUG FIXES into users administration
  1800. #  - No more meaningless error when making a dummy group edition (with no change)
  1801. #  - Mailbox is now deleted when a user is deleted
  1802. #  - No more error about slis group when making smbadmin config
  1803. #  - Now that LDAP can manage logins begining with a letter and upper case
  1804. #  letters, we removed the tests made when creating users
  1805. # Obsolletes :
  1806. ############################################################################
  1807.  
  1808. if [ ! \( -e $UPDDIR/3.x-57 \) ]
  1809. then
  1810.  
  1811.   # Download the files
  1812.   cd /tmp
  1813.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-57.tgz .
  1814.  
  1815.   # Do the things....
  1816.   tar zxf upd-3.x-57.tgz --exclude usr/local/ --directory /
  1817.   RC=$?
  1818.  
  1819.   # Check and finish
  1820.   if [ $RC = 0 ]
  1821.   then
  1822.     touch $UPDDIR/3.x-57
  1823.     logger -t "$LOGTAG" "Update 3.x-57 Done."
  1824.   else
  1825.     logger -t "$LOGTAG" "Update 3.x-57 FAILED."
  1826.   fi
  1827. fi
  1828. ###
  1829.  
  1830.  
  1831. ############################################################################
  1832. ### Update 3.x-58 - 1/09/2003
  1833. # SECURITY : OpenSSH , Wu-ftpd , unzip, sendmail
  1834. # Obsoletes :
  1835. ############################################################################
  1836.  
  1837. if [ ! \( -e $UPDDIR/3.x-58 \) ]
  1838. then
  1839.  
  1840.   # Download the files
  1841.   cd /tmp
  1842.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/arpwatch-2.1a11-17.7.3.2.i386.rpm .
  1843.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/cups-libs-1.1.14-15.4.i386.rpm .
  1844.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/libpcap-0.6.2-17.7.3.2.i386.rpm .
  1845.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/libstdc++-2.96-113.i386.rpm .
  1846.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/losetup-2.11n-12.7.3.i386.rpm .
  1847.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/mm-1.1.3-11.i386.rpm .
  1848.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/mount-2.11n-12.7.3.i386.rpm .
  1849.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/nscd-2.2.5-43.i386.rpm .
  1850.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/openssh-3.1p1-8.i386.rpm .
  1851.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/openssh-clients-3.1p1-8.i386.rpm .
  1852.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/openssh-server-3.1p1-8.i386.rpm .
  1853.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/unzip-5.50-31.i386.rpm .
  1854.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/wu-ftpd-2.6.2-11.73.1.i386.rpm .
  1855.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/hwdata-0.14.1-1.noarch.rpm .
  1856.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/sendmail-8.12.8-6.73.i386.rpm .
  1857.  
  1858.   # Do the things...
  1859.  
  1860.   rpm -F arpwatch-2.1a11-17.7.3.2.i386.rpm \
  1861.          cups-libs-1.1.14-15.4.i386.rpm \
  1862.          libpcap-0.6.2-17.7.3.2.i386.rpm \
  1863.          libstdc++-2.96-113.i386.rpm \
  1864.          losetup-2.11n-12.7.3.i386.rpm \
  1865.          mm-1.1.3-11.i386.rpm \
  1866.          mount-2.11n-12.7.3.i386.rpm \
  1867.          nscd-2.2.5-43.i386.rpm \
  1868.          openssh-3.1p1-8.i386.rpm \
  1869.          openssh-clients-3.1p1-8.i386.rpm \
  1870.          openssh-server-3.1p1-8.i386.rpm \
  1871.          unzip-5.50-31.i386.rpm \
  1872.          hwdata-0.14.1-1.noarch.rpm \
  1873.          wu-ftpd-2.6.2-11.73.1.i386.rpm \
  1874.          sendmail-8.12.8-6.73.i386.rpm
  1875.   RC1=$?
  1876.  
  1877.   # Check and finish
  1878.   if [ $RC1 = 0 ]
  1879.   then
  1880.     /etc/rc.d/init.d/sshd restart
  1881.     touch $UPDDIR/3.x-58
  1882.     logger -t "$LOGTAG" "Update 3.x-58 Done."
  1883.   else
  1884.     logger -t "$LOGTAG" "Update 3.x-58 FAILED."
  1885.   fi
  1886. fi
  1887. ###
  1888.  
  1889. ############################################################################
  1890. ### Update 3.x-59 - 1/09/2003
  1891. # SECURITY : iptables
  1892. # Obsoletes :
  1893. ############################################################################
  1894.  
  1895. if [ ! \( -e $UPDDIR/3.x-59 \) ]
  1896. then
  1897.  
  1898.   # Download the files
  1899.   cd /tmp
  1900.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/iptables-1.2.8-8.72.3.i386.rpm .
  1901.  
  1902.   # Do the things...
  1903.  
  1904.   rpm -F iptables-1.2.8-8.72.3.i386.rpm
  1905.   RC1=$?
  1906.  
  1907.   # Check and finish
  1908.   if [ $RC1 = 0 ]
  1909.   then
  1910.     /usr/local/sbin/masquerade
  1911.     touch $UPDDIR/3.x-59
  1912.     logger -t "$LOGTAG" "Update 3.x-59 Done."
  1913.   else
  1914.     logger -t "$LOGTAG" "Update 3.x-59 FAILED (maybe kernel not up-to-date)."
  1915.   fi
  1916. fi
  1917. ###
  1918.  
  1919. ############################################################################
  1920. ### Update 3.x-60 - 09/09/2003
  1921. # BUG FIXES
  1922. # - Since 3.x-57, groups beginning with a letter were not well managed
  1923. # - Little problem with cg_valid if nothing to-valid
  1924. # Obsolletes :
  1925. ############################################################################
  1926.  
  1927. if [ ! \( -e $UPDDIR/3.x-60 \) ]
  1928. then
  1929.  
  1930.   # Download the files
  1931.   cd /tmp
  1932.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-60.tgz .
  1933.  
  1934.   # Do the things....
  1935.   tar zxf upd-3.x-60.tgz --exclude usr/local/ --directory /
  1936.   RC=$?
  1937.   /usr/local/sbin/permslis
  1938.   /usr/local/sbin/valid
  1939.  
  1940.   # Check and finish
  1941.   if [ $RC = 0 ]
  1942.   then
  1943.     touch $UPDDIR/3.x-60
  1944.     logger -t "$LOGTAG" "Update 3.x-60 Done."
  1945.   else
  1946.     logger -t "$LOGTAG" "Update 3.x-60 FAILED."
  1947.   fi
  1948. fi
  1949. ###
  1950.  
  1951. ############################################################################
  1952. ### Update 3.x-61 - 15/09/2003
  1953. # BUG FIXES/ENHANCEMENTS:
  1954. # - UTF8 encoding was missing into cg_valid and in the gecos field from valid
  1955. # - Spaces into logins were allowed into imports, causing big problems
  1956. # - ldapadm and smbadm were deletable when deleting all users from a search
  1957. # - modifconf script has now a new option: -N
  1958. # - new SLIS option: GATEWAY_PING preventing from pinging the gateway if
  1959. # set to 0.
  1960. # SECURITY:
  1961. # - Unused allow_url_fopen php option deactivated. It prevents from cross-
  1962. # scripting attacks.
  1963. # Obsolletes :
  1964. ############################################################################
  1965.  
  1966. if [ ! \( -e $UPDDIR/3.x-61 \) ]
  1967. then
  1968.  
  1969.   # Download the files
  1970.   cd /tmp
  1971.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-61.tgz .
  1972.  
  1973.   # Do the things....
  1974.   tar zxf upd-3.x-61.tgz --exclude usr/local/ --directory /
  1975.   RC=$?
  1976.   /usr/local/sbin/permslis
  1977.   /usr/local/sbin/init_options -u 2>/dev/null
  1978.   /usr/local/sbin/valid
  1979.  
  1980.   # Check and finish
  1981.   if [ $RC = 0 ]
  1982.   then
  1983.     echo "allow_url_fopen = Off" >> /etc/php.ini
  1984.     echo "allow_url_fopen = Off" >> /etc/hadmin/php.ini
  1985.     echo "allow_url_fopen = Off" >> /etc/hadmin/clientgw/php.ini
  1986.     killall -HUP httpd
  1987.     touch $UPDDIR/3.x-61
  1988.     logger -t "$LOGTAG" "Update 3.x-61 Done."
  1989.   else
  1990.     logger -t "$LOGTAG" "Update 3.x-61 FAILED."
  1991.   fi
  1992. fi
  1993. ###
  1994.  
  1995. ############################################################################
  1996. ### Update 3.x-62 - 11/09/2003
  1997. # Enhancements: Interface update.
  1998. # ImplΘmentation de la gestion du DNS
  1999. # Modifications apportΘes depuis la version 3.x-50 :
  2000. #  1- Modification de la base de donnΘes : allongement des noms de zone,
  2001. # d'alias et du nom des machines dΘfinies dans le DNS 0 128 CARACT7RES
  2002. # 2- Petite correction sur la prise en charge du masque IP lors de la
  2003. # dΘclaration ou de la modification des machines dΘfinies dans le DNS
  2004. # 3- Correctif sur la modification de l'IP dans l'interface d'administration
  2005. # du DNS
  2006. # Obsoletes : 3.x-50 et 3.x-50b
  2007. ############################################################################
  2008.  
  2009. if [ ! \( -e $UPDDIR/3.x-62 \) ]
  2010. then
  2011.   # Download the files
  2012.   cd /tmp
  2013.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-62.tgz .
  2014.  
  2015.   # Do the things....
  2016.   sleep 1
  2017.   # teste que postgresql tourne
  2018.   if [ "`ps awx | grep postgres`" = "" ]
  2019.   then
  2020.     logger -t "$LOGTAG" "Update 3.x-62 POSTGRES FAILED."
  2021.   else
  2022.     tar zxf upd-3.x-62.tgz --exclude usr/local/ --directory /
  2023.     RC=$?
  2024.     /usr/local/sbin/permslis
  2025.     export PHPRC="/etc/hadmin"
  2026.     #test de rΘussite
  2027.     # Check and finish
  2028.     if [ "$RC" = "0" ]
  2029.     then
  2030.       # test de l'exΘcution ou non des scripts 50 et 50b
  2031.       if [ \( -e $UPDDIR/3.x-50 \) -o \( -e $UPDDIR/3.x-50b \) ]
  2032.       then
  2033.         php /home/hadmin/html/dns/drop.php
  2034.         RC=$?
  2035.         logger -t "$LOGTAG" "DROP TABLE"
  2036.         if [ "$RC" != "0" ]
  2037.         then
  2038.           logger -t "$LOGTAG" "Drop Table FAILED Critical."
  2039.           ok="non"
  2040.         else
  2041.            ok="oui"
  2042.         fi
  2043.       else ok="oui"
  2044.       fi
  2045.  
  2046.       if [ "$ok" = "oui" ]
  2047.       then
  2048.         php /home/hadmin/html/dns/sql.php
  2049.         RC=$?
  2050.         # Check and finish
  2051.         if [ "$RC" = "0" ]
  2052.         then
  2053.           touch $UPDDIR/3.x-62
  2054.           logger -t "$LOGTAG" "Update 3.x-62 Done."
  2055.           /bin/rm -f /home/hadmin/html/dns/drop.php
  2056.           /bin/rm -f /home/hadmin/html/dns/sql.php
  2057.         else
  2058.           logger -t "$LOGTAG" "Update 3.x-62 FAILED No create table."
  2059.         fi
  2060.       fi
  2061.     else
  2062.       logger -t "$LOGTAG" "Update 3.x-62 FAILED Prob with archive."
  2063.     fi
  2064.   fi
  2065. fi
  2066. ###
  2067.  
  2068.  
  2069. ############################################################################
  2070. ### Update 3.x-64 - 18/09/2003
  2071. # SECURITY: Openssh, sendmail
  2072. # Obsoletes : 3.x-63
  2073. ############################################################################
  2074.  
  2075. if [ ! \( -e $UPDDIR/3.x-64 \) ]
  2076. then
  2077.  
  2078.   # Download the files
  2079.   cd /tmp
  2080.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/openssh-3.1p1-14.i386.rpm .
  2081.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/openssh-server-3.1p1-14.i386.rpm .
  2082.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/openssh-clients-3.1p1-14.i386.rpm .
  2083.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/sendmail-8.12.8-9.73.i386.rpm .
  2084.  
  2085.  
  2086.   # Do the things...
  2087.   rpm -F openssh-3.1p1-14.i386.rpm \
  2088.          openssh-server-3.1p1-14.i386.rpm \
  2089.          openssh-clients-3.1p1-14.i386.rpm \
  2090.          sendmail-8.12.8-9.73.i386.rpm
  2091.   RC1=$?
  2092.  
  2093.   # Check and finish
  2094.   if [ $RC1 = 0 ]
  2095.   then
  2096.  
  2097.     touch $UPDDIR/3.x-64
  2098.     logger -t "$LOGTAG" "Update 3.x-64 Done."
  2099.   else
  2100.     logger -t "$LOGTAG" "Update 3.x-64 FAILED."
  2101.   fi
  2102. fi
  2103. ###
  2104.  
  2105. ############################################################################
  2106. ### Update 3.x-65 - 05/11/2003
  2107. # SECURITY: Apache, OpenSSL, fileutils, ucd-snmp
  2108. # Obsoletes : 3.x-36 3.x-23
  2109. ############################################################################
  2110.  
  2111. if [ ! \( -e $UPDDIR/3.x-65 \) ]
  2112. then
  2113.  
  2114.   # Download the files
  2115.   cd /tmp
  2116.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/apache-1.3.27-3.i386.rpm .
  2117.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/openssl-0.9.6b-35.7.i386.rpm .
  2118.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/mysql-3.23.58-1.73.i386.rpm .
  2119.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/ucd-snmp-4.2.5-8.73.1.i386.rpm .
  2120.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/ucd-snmp-utils-4.2.5-8.73.1.i386.rpm .
  2121.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/fileutils-4.1-10.4.i386.rpm .
  2122.  
  2123.  # Do the things...
  2124.   rpm -F apache-1.3.27-3.i386.rpm \
  2125.         openssl-0.9.6b-35.7.i386.rpm \
  2126.         mysql-3.23.58-1.73.i386.rpm \
  2127.         ucd-snmp-4.2.5-8.73.1.i386.rpm \
  2128.         ucd-snmp-utils-4.2.5-8.73.1.i386.rpm \
  2129.         fileutils-4.1-10.4.i386.rpm
  2130.  
  2131.   RC1=$?
  2132.  
  2133.   # Check and finish
  2134.   if [ $RC1 = 0 ]
  2135.   then
  2136.     
  2137.     /sbin/service httpd restart    
  2138.  
  2139.     touch $UPDDIR/3.x-65
  2140.     logger -t "$LOGTAG" "Update 3.x-65 Done."
  2141.   else
  2142.     logger -t "$LOGTAG" "Update 3.x-65 FAILED."
  2143.   fi
  2144. fi
  2145. ###
  2146.  
  2147. ############################################################################
  2148. # Update 3.x-66 - 10/08/2003
  2149. # Bug fixes in the mail filter module:
  2150. #  - root can really post to anywhere!
  2151. # Obsolletes :
  2152. ############################################################################
  2153.  
  2154. if [ ! \( -e $UPDDIR/3.x-66 \) ]
  2155. then
  2156.      # Download the files
  2157.      cd /tmp
  2158.      rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-66.tgz .
  2159.  
  2160.      # Stop the smilter daemon
  2161.      /etc/rc.d/init.d/smilter stop
  2162.  
  2163.      # Do the things ...
  2164.      tar xfz upd-3.x-66.tgz --directory /
  2165.      RC=$?
  2166.      /usr/local/sbin/permslis
  2167.  
  2168.      # Start again smilterd, and restart sendmail
  2169.      /etc/rc.d/init.d/smilter start
  2170.      /etc/rc.d/init.d/sendmail restart
  2171.  
  2172.      # Check and finish
  2173.      if [ $RC = 0 ]
  2174.      then
  2175.          touch $UPDDIR/3.x-66
  2176.          logger -t "$LOGTAG" "Update 3.x-66 Done."
  2177.      else
  2178.          logger -t "$LOGTAG" "Update 3.x-66 FAILED."
  2179.      fi
  2180. fi
  2181. ###
  2182.  
  2183. ############################################################################
  2184. # Update 3.x-67 - 11/12/2003
  2185. # - Experimental replication for LDAP Server with a SE3 or a other SLIS server
  2186. # - Modifconf bug fix (crontab)
  2187. # Obsoletes :
  2188. ############################################################################
  2189.  
  2190. if [ ! \( -e $UPDDIR/3.x-67 \) ]
  2191. then
  2192.      # Download the files
  2193.      cd /tmp
  2194.      rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.x-67.tgz .
  2195.  
  2196.      # Do the things ...
  2197.      tar xfz upd-3.x-67.tgz --exclude usr/local/ --directory /
  2198.      RC=$?
  2199.      /usr/local/sbin/permslis
  2200.  
  2201.      /usr/local/sbin/init_options -u 2> /dev/null
  2202.  
  2203.      # Check and finish
  2204.      if [ $RC = 0 ]
  2205.      then
  2206.          touch $UPDDIR/3.x-67
  2207.          logger -t "$LOGTAG" "Update 3.x-67 Done."
  2208.      else
  2209.          logger -t "$LOGTAG" "Update 3.x-67 FAILED."
  2210.      fi
  2211. fi
  2212. ###
  2213.  
  2214. ############################################################################
  2215. ### Update 3.x-68 - 18/11/2003
  2216. # SECURITY: Glibc, postgres
  2217. # Obsoletes : 3.x-03(updated), 3.x-09b, 3.x-22
  2218. ############################################################################
  2219.  
  2220. declare -i HOUR
  2221. HOUR=`date +%k`
  2222. # Update by night:
  2223. if [ ! \( -e $UPDDIR/3.x-68 \) -a $HOUR -lt 6 ]
  2224. # or whenever
  2225. #if [ ! \( -e $UPDDIR/3.x-68 \) ]
  2226. then
  2227.  
  2228.   # Download the files
  2229.   cd /tmp
  2230.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/postgresql-server-7.2.4-5.73.i386.rpm .
  2231.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/postgresql-libs-7.2.4-5.73.i386.rpm .
  2232.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/postgresql-7.2.4-5.73.i386.rpm .
  2233.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/glibc-2.2.5-44.i386.rpm .
  2234.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/glibc-common-2.2.5-44.i386.rpm .
  2235.  
  2236.  # Do the things...
  2237.   rpm -F postgresql-server-7.2.4-5.73.i386.rpm \
  2238.         postgresql-libs-7.2.4-5.73.i386.rpm \
  2239.         postgresql-7.2.4-5.73.i386.rpm \
  2240.         glibc-2.2.5-44.i386.rpm \
  2241.         glibc-common-2.2.5-44.i386.rpm
  2242.  
  2243.   RC1=$?
  2244.  
  2245.   # Check and finish
  2246.   if [ $RC1 = 0 ]
  2247.   then
  2248.  
  2249.     sleep 3
  2250.     perl -pi -e "s/pg_ctl  -D/pg_ctl -o -i -D/" /etc/rc.d/init.d/postgresql
  2251.     /etc/rc.d/init.d/postgresql stop
  2252.     sleep 3
  2253.     killall postmaster 2>/dev/null
  2254.     sleep 2
  2255.     killall -9 postmaster 2>/dev/null
  2256.     sleep 2
  2257.     /etc/rc.d/init.d/postgresql start
  2258.  
  2259.     touch $UPDDIR/3.x-68
  2260.     logger -t "$LOGTAG" "Update 3.x-68 Done."
  2261.   else
  2262.     logger -t "$LOGTAG" "Update 3.x-68 FAILED."
  2263.   fi
  2264. fi
  2265. ###
  2266.  
  2267. ############################################################################
  2268. # Update 3.x-69 - 2003-11-25
  2269. # Cleaning of /tmp
  2270. # This cleans up the biggest files previously downloaded if the corresponding
  2271. # updates are successfull. From now, we must be carefull about the space
  2272. # of /tmp by removing all the files after an update successfully ended. 
  2273. # Otherwise, newly installed SLIS on small disks will crash.
  2274. # Obsolletes :
  2275. ############################################################################
  2276.  
  2277. if [ ! \( -e $UPDDIR/3.x-69 \) ]
  2278. then
  2279.   cd /tmp
  2280.  
  2281.   if [ -e $UPDDIR/3.x-03 -a -e $UPDDIR/3.x-68 ]
  2282.   then
  2283.     rm -f postgresql*
  2284.     rm -f glibc*
  2285.   fi
  2286.  
  2287.   if [ -e $UPDDIR/3.x-46 -a -e $UPDDIR/3.x-65 ]
  2288.   then
  2289.     rm -f mysql*
  2290.     rm -f openssl*
  2291.   fi
  2292.  
  2293.   if [ -e $UPDDIR/3.x-18 -a -e $UPDDIR/3.x-65 ]
  2294.   then
  2295.     rm -f apache*
  2296.   fi
  2297.  
  2298.   if [ -e $UPDDIR/3.x-07 ]
  2299.   then
  2300.     rm -f php*
  2301.   fi 
  2302.  
  2303.   if [ -e $UPDDIR/3.x-28 ]
  2304.   then
  2305.     rm -f lynx*
  2306.   fi
  2307.  
  2308.   if [ -e $UPDDIR/3.x-28 -a -e $UPDDIR/3.x-65 ]
  2309.   then
  2310.     rm -f fileutils*
  2311.   fi
  2312.  
  2313.   if [ -e $UPDDIR/3.x-65 ]
  2314.   then
  2315.     rm -f ucd-snmp*
  2316.   fi
  2317.  
  2318.   if [ -e $UPDDIR/3.x-06 -a -e $UPDDIR/3.x-26 ]
  2319.   then
  2320.     rm -f openldap*
  2321.   fi
  2322.  
  2323.  
  2324.   touch $UPDDIR/3.x-69
  2325.   logger -t "$LOGTAG" "Update 3.x-69 Done."
  2326.  
  2327. fi
  2328. ###
  2329.  
  2330.  
  2331. ############################################################################
  2332. ### Update 3.x-70 - 2004-03-05
  2333. # SECURITY: slocate,tcpdump
  2334. # Obsoletes :
  2335. ############################################################################
  2336.  
  2337. if [ ! \( -e $UPDDIR/3.x-70 \) ]
  2338. then
  2339.  
  2340.   # Download the files
  2341.   cd /tmp
  2342.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/slocate-2.7-1.7.3.legacy.i386.rpm .
  2343.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/tcpdump-3.6.3-17.7.3.4.legacy.i386.rpm .
  2344.  
  2345.   # Do the things...
  2346.   rpm -F slocate-2.7-1.7.3.legacy.i386.rpm \
  2347.          tcpdump-3.6.3-17.7.3.4.legacy.i386.rpm
  2348.   RC1=$?
  2349.  
  2350.   # Check and finish
  2351.   if [ $RC1 = 0 ]
  2352.   then
  2353.  
  2354.     touch $UPDDIR/3.x-70
  2355.     logger -t "$LOGTAG" "Update 3.x-70 Done."
  2356.   else
  2357.     logger -t "$LOGTAG" "Update 3.x-70 FAILED."
  2358.   fi
  2359. fi
  2360. ###
  2361.  
  2362. ############################################################################
  2363. ### Update 3.x-71 - 2004-03-25
  2364. # Add of the retail tool
  2365. # Obsoletes :
  2366. ############################################################################
  2367.  
  2368. if [ ! \( -e $UPDDIR/3.x-71 \) ]
  2369. then
  2370.  
  2371.   # Download the files
  2372.   cd /tmp
  2373.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/retail-1.0.1-1.i386.rpm .
  2374.  
  2375.   # Do the things...
  2376.   rpm -U retail-1.0.1-1.i386.rpm
  2377.   RC1=$?
  2378.  
  2379.   # Check and finish
  2380.   if [ $RC1 = 0 ]
  2381.   then
  2382.  
  2383.     touch $UPDDIR/3.x-71
  2384.     logger -t "$LOGTAG" "Update 3.x-71 Done."
  2385.   else
  2386.     logger -t "$LOGTAG" "Update 3.x-71 FAILED."
  2387.   fi
  2388. fi
  2389. ###
  2390.  
  2391. ############################################################################
  2392. # Update 3.0-72 - 26/03/2004
  2393. # Fix of the MD5 checksum problem with monitor/slis_update script
  2394. # Obsoletes :
  2395. ############################################################################
  2396.  
  2397. if [ ! \( -e $UPDDIR/3.0-72 \) ]
  2398. then
  2399.      # Download the files
  2400.      cd /tmp
  2401.      rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.0-72.tgz .
  2402.  
  2403.      # Do the things ...
  2404.      tar xfz upd-3.0-72.tgz --exclude usr/local/ --directory /
  2405.      RC=$?
  2406.      /usr/local/sbin/permslis
  2407.  
  2408.      # Check and finish
  2409.      if [ $RC = 0 ]
  2410.      then
  2411.          touch $UPDDIR/3.0-72
  2412.          logger -t "$LOGTAG" "Update 3.0-72 Done."
  2413.      else
  2414.          logger -t "$LOGTAG" "Update 3.0-72 FAILED."
  2415.      fi
  2416. fi
  2417. ###
  2418.  
  2419.  
  2420. ############################################################################
  2421. # Update 3.0-73 - 30/04/2004
  2422. # Added 1098 as a safe SSL port into squid configuration
  2423. # Obsoletes :
  2424. ############################################################################
  2425.  
  2426. if [ ! \( -e $UPDDIR/3.0-73 \) ]
  2427. then
  2428.      # Download the files
  2429.      cd /tmp
  2430.      rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.0-73.tgz .
  2431.  
  2432.      # Do the things ...
  2433.      tar xfz upd-3.0-73.tgz --exclude usr/local/ --directory /
  2434.      RC=$?
  2435.      /usr/local/sbin/permslis
  2436.  
  2437.      # Check and finish
  2438.      if [ $RC = 0 ]
  2439.      then
  2440.          # Instead of fully regenerating the squid.conf file by
  2441.      # a call of the new mksquidoncf script, I prefer to 
  2442.      # carefully edit the squid.conf directly, in the case this
  2443.      # file has been manualy edited
  2444.          perl -pi -e "s/acl SSL_ports port 443 563.*/acl SSL_ports port 443 563 1098/" /etc/squid/squid.conf
  2445.      killall -HUP squid         
  2446.  
  2447.          touch $UPDDIR/3.0-73
  2448.          logger -t "$LOGTAG" "Update 3.0-73 Done."
  2449.      else
  2450.          logger -t "$LOGTAG" "Update 3.0-73 FAILED."
  2451.      fi
  2452. fi
  2453. ###
  2454.  
  2455. ############################################################################
  2456. # Update 3.0-74 - 06/05/2004
  2457. # SECURITY: Fixes a vulnerability of the web server configuration: one could
  2458. # do a privilege escalation by using SSI and a mistake in the permission of
  2459. # the httpd.conf file. Thanx to Jean Diraison, from Versailles!
  2460. # Obsoletes :
  2461. ############################################################################
  2462.  
  2463. if [ ! \( -e $UPDDIR/3.0-74 \) ]
  2464. then
  2465.      # Download the files
  2466.      cd /tmp
  2467.      rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.0-74.tgz .
  2468.  
  2469.      # Do the things ...
  2470.      tar xfz upd-3.0-74.tgz --exclude usr/local/ --directory /
  2471.      RC=$?
  2472.      bash /usr/local/sbin/permslis
  2473.      perl -pi -e "s/AddHandler server-parsed/#AddHandler server-parsed/" /etc/httpd/conf/httpd.conf
  2474.      killall -HUP httpd
  2475.  
  2476.      # Check and finish
  2477.      if [ $RC = 0 ]
  2478.      then
  2479.          touch $UPDDIR/3.0-74
  2480.          logger -t "$LOGTAG" "Update 3.0-74 Done."
  2481.      else
  2482.          logger -t "$LOGTAG" "Update 3.0-74 FAILED."
  2483.      fi
  2484. fi
  2485. ###
  2486.  
  2487.  
  2488. ############################################################################
  2489. # Update 3.0-75 - 11/05/2004
  2490. # BUG FIX: 3.0-74 side effect: administrator could not change passwd anymore
  2491. # SECURITY: The admin could pass arbitrary commands to root by using well
  2492. # constructed urls sent to the services.php script. (Thanx to Jean Diraison)
  2493. # Obsoletes :
  2494. ############################################################################
  2495.  
  2496. if [ ! \( -e $UPDDIR/3.0-75 \) ]
  2497. then
  2498.      # Download the files
  2499.      cd /tmp
  2500.      rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.0-75.tgz .
  2501.  
  2502.      # Do the things ...
  2503.      tar xfz upd-3.0-75.tgz --exclude usr/local/ --directory /
  2504.      RC=$?
  2505.      bash /usr/local/sbin/permslis
  2506.  
  2507.      # Check and finish
  2508.      if [ $RC = 0 ]
  2509.      then
  2510.          touch $UPDDIR/3.0-75
  2511.          logger -t "$LOGTAG" "Update 3.0-75 Done."
  2512.      else
  2513.          logger -t "$LOGTAG" "Update 3.0-75 FAILED."
  2514.      fi
  2515. fi
  2516. ###
  2517.  
  2518. ############################################################################
  2519. ### Update 3.0-76 - 2004-05-11
  2520. # SECURITY: openssl
  2521. # Obsoletes :
  2522. ############################################################################
  2523.  
  2524. if [ ! \( -e $UPDDIR/3.0-76 \) ]
  2525. then
  2526.  
  2527.   # Download the files
  2528.   cd /tmp
  2529.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/openssl-0.9.6b-36.7.legacy.i386.rpm .
  2530.  
  2531.   # Do the things...
  2532.   rpm -F openssl-0.9.6b-36.7.legacy.i386.rpm
  2533.   RC1=$?
  2534.  
  2535.   # Check and finish
  2536.   if [ $RC1 = 0 ]
  2537.   then
  2538.  
  2539.     touch $UPDDIR/3.0-76
  2540.     logger -t "$LOGTAG" "Update 3.0-76 Done."
  2541.   else
  2542.     logger -t "$LOGTAG" "Update 3.0-76 FAILED."
  2543.   fi
  2544. fi
  2545. ###
  2546.  
  2547. ############################################################################
  2548. ### Update 3.0-77 - 2004-05-27
  2549. # SECURITY: libtool-lib, utempter
  2550. # Obsoletes :
  2551. ############################################################################
  2552.  
  2553. if [ ! \( -e $UPDDIR/3.0-77 \) ]
  2554. then
  2555.  
  2556.   # Download the files
  2557.   cd /tmp
  2558.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/libtool-libs-1.4.2-13.legacy.i386.rpm .
  2559.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/utempter-0.5.2-6.7.x.1.legacy.i386.rpm .
  2560.  
  2561.   # Do the things...
  2562.   rpm -F libtool-libs-1.4.2-13.legacy.i386.rpm  utempter-0.5.2-6.7.x.1.legacy.i386.rpm
  2563.   RC1=$?
  2564.  
  2565.   # Check and finish
  2566.   if [ $RC1 = 0 ]
  2567.   then
  2568.  
  2569.     touch $UPDDIR/3.0-77
  2570.     logger -t "$LOGTAG" "Update 3.0-77 Done."
  2571.   else
  2572.     logger -t "$LOGTAG" "Update 3.0-77 FAILED."
  2573.   fi
  2574. fi
  2575. ###
  2576.  
  2577. ############################################################################
  2578. # Update 3.0-78 - 23/06/2004
  2579. # Bug fix: precompiled adult database was not loaded by squidguard
  2580. # (new mksquidguardconf script)
  2581. # Obsoletes :
  2582. ############################################################################
  2583.                                                                                 
  2584. if [ ! \( -e $UPDDIR/3.0-78 \) ]
  2585. then
  2586.      # Download the files
  2587.      cd /tmp
  2588.      rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.0-78.tgz .
  2589.                                                                                 
  2590.      # Do the things ...
  2591.      tar xfz upd-3.0-78.tgz --exclude usr/local/ --directory /
  2592.      RC=$?
  2593.      bash /usr/local/sbin/permslis
  2594.      /usr/local/sbin/mksquidguardconf
  2595.      killall -HUP squid
  2596.                                                                                 
  2597.      # Check and finish
  2598.      if [ $RC = 0 ]
  2599.      then
  2600.          touch $UPDDIR/3.0-78
  2601.          logger -t "$LOGTAG" "Update 3.0-78 Done."
  2602.      else
  2603.          logger -t "$LOGTAG" "Update 3.0-78 FAILED."
  2604.      fi
  2605. fi
  2606. ###
  2607.  
  2608. ############################################################################
  2609. # Update 3.0-79 - 07/09/2004
  2610. # Postgresql vacuum analyse
  2611. # Obsoletes :
  2612. ############################################################################
  2613.  
  2614. if [ ! \( -e $UPDDIR/3.0-79 \) ]
  2615. then
  2616.      # Download the files
  2617.      cd /tmp
  2618.      rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.0-79.tgz .
  2619.  
  2620.      # Do the things ...
  2621.      tar xfz upd-3.0-79.tgz --exclude usr/local/ --directory /
  2622.      RC=$?
  2623.      bash /usr/local/sbin/permslis
  2624.      bash /usr/local/sbin/vacuum.bash
  2625.  
  2626.      # Check and finish
  2627.      if [ $RC = 0 ]
  2628.      then
  2629.          touch $UPDDIR/3.0-79
  2630.          logger -t "$LOGTAG" "Update 3.0-79 Done."
  2631.      else
  2632.          logger -t "$LOGTAG" "Update 3.0-79 FAILED."
  2633.      fi
  2634. fi
  2635. ###
  2636.  
  2637. ############################################################################
  2638. ### Update 3.0-80 - 2004-10-11
  2639. # SECURITY: arpwatch php php-mysql sysklogd libpcap php-imap php-pgsql 
  2640. # tcpdump libxml2 php-ldap rsync
  2641. # Obsoletes :
  2642. ############################################################################
  2643.  
  2644. if [ ! \( -e $UPDDIR/3.0-80 \) ]
  2645. then
  2646.  
  2647.   # Download the files
  2648.   cd /tmp
  2649.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/arpwatch-2.1a11-17.7.3.6.legacy.i386.rpm .
  2650.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/libpcap-0.6.2-17.7.3.6.legacy.i386.rpm .
  2651.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/libxml2-2.4.19-6.legacy.i386.rpm .
  2652.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/php-4.1.2-7.3.10.legacy.i386.rpm .
  2653.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/php-imap-4.1.2-7.3.10.legacy.i386.rpm .
  2654.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/php-ldap-4.1.2-7.3.10.legacy.i386.rpm .
  2655.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/php-mysql-4.1.2-7.3.10.legacy.i386.rpm .
  2656.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/php-pgsql-4.1.2-7.3.10.legacy.i386.rpm .
  2657.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/rsync-2.5.7-2.legacy.7x.i386.rpm .
  2658.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/sysklogd-1.4.1-14.legacy.7x.i386.rpm .
  2659.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/tcpdump-3.6.3-17.7.3.6.legacy.i386.rpm .
  2660.  
  2661.   # Do the things...
  2662.   rpm -e arpwatch-2.1a4-29slisA 2>/dev/null
  2663.   rpm -U arpwatch-2.1a11-17.7.3.6.legacy.i386.rpm  
  2664.   rpm -F php-4.1.2-7.3.10.legacy.i386.rpm \
  2665.          php-mysql-4.1.2-7.3.10.legacy.i386.rpm  sysklogd-1.4.1-14.legacy.7x.i386.rpm \
  2666.          libpcap-0.6.2-17.7.3.6.legacy.i386.rpm php-imap-4.1.2-7.3.10.legacy.i386.rpm \
  2667.          php-pgsql-4.1.2-7.3.10.legacy.i386.rpm tcpdump-3.6.3-17.7.3.6.legacy.i386.rpm \
  2668.          libxml2-2.4.19-6.legacy.i386.rpm  php-ldap-4.1.2-7.3.10.legacy.i386.rpm  \
  2669.          rsync-2.5.7-2.legacy.7x.i386.rpm 
  2670.   RC2=$?
  2671.  
  2672.   # Check and finish
  2673.   if [ $RC2 = 0 ]
  2674.   then
  2675.  
  2676.     touch $UPDDIR/3.0-80
  2677.     logger -t "$LOGTAG" "Update 3.0-80 Done."
  2678.   else
  2679.     logger -t "$LOGTAG" "Update 3.0-80 FAILED."
  2680.   fi
  2681. fi
  2682. ###
  2683.  
  2684. ############################################################################
  2685. ### Update 3.0-81 - 2004-10-18
  2686. # SECURITY: apache, samba
  2687. # Obsoletes :
  2688. ############################################################################
  2689.  
  2690. if [ ! \( -e $UPDDIR/3.0-81 \) ]
  2691. then
  2692.  
  2693.   # Download the files
  2694.   cd /tmp
  2695.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/apache-1.3.27-5.legacy.i386.rpm .
  2696.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/samba-2.2.12-0.73.3.legacy.i386.rpm .
  2697.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/samba-client-2.2.12-0.73.3.legacy.i386.rpm .
  2698.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/samba-common-2.2.12-0.73.3.legacy.i386.rpm .
  2699.  
  2700.   # Do the things...
  2701.   rpm -F  apache-1.3.27-5.legacy.i386.rpm \
  2702.           samba-2.2.12-0.73.3.legacy.i386.rpm \
  2703.           samba-client-2.2.12-0.73.3.legacy.i386.rpm \
  2704.           samba-common-2.2.12-0.73.3.legacy.i386.rpm
  2705.   RC1=$?
  2706.  
  2707.   # Check and finish
  2708.   if [ $RC1 = 0 ]
  2709.   then
  2710.  
  2711.     /etc/rc.d/init.d/httpd stop > /dev/null
  2712.     killall httpd 2> /dev/null
  2713.     sleep 5
  2714.     killall -9 httpd 2> /dev/null
  2715.     sleep 2
  2716.     /etc/rc.d/init.d/httpd start > /dev/null
  2717.     export PHPRC="/etc/hadmin";/usr/sbin/httpd -f /etc/hadmin/conf/httpd.conf;export -n PHPRC
  2718.     export PHPRC=/etc/hadmin;/usr/sbin/httpd -f /etc/hadmin/clientgw/conf/httpd.conf;export -n PHPRC
  2719.  
  2720.     touch $UPDDIR/3.0-81
  2721.     logger -t "$LOGTAG" "Update 3.0-81 Done."
  2722.   else
  2723.     logger -t "$LOGTAG" "Update 3.0-81 FAILED."
  2724.   fi
  2725. fi
  2726. ###
  2727.  
  2728. ############################################################################
  2729. ### Update 3.0-82 - 2004-12-23
  2730. # SECURITY: apache, glibc, tripwire(optional), mod_ssl(optional)
  2731. # Obsoletes :
  2732. ############################################################################
  2733.  
  2734. if [ ! \( -e $UPDDIR/3.0-82 \) ]
  2735. then
  2736.  
  2737.   # Download the files
  2738.   cd /tmp
  2739.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/apache-1.3.27-6.legacy.i386.rpm .
  2740.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/glibc-2.2.5-44.legacy.3.i386.rpm .
  2741.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/glibc-common-2.2.5-44.legacy.3.i386.rpm .
  2742.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/nscd-2.2.5-44.legacy.3.i386.rpm .
  2743.   #rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/mod_ssl-2.8.12-7.legacy.i386.rpm .
  2744.   #rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/tripwire-2.3.1-10.1.legacy.7x.i386.rpm .
  2745.   
  2746.  
  2747.   # Do the things...
  2748.   rpm -F  apache-1.3.27-6.legacy.i386.rpm \
  2749.           glibc-2.2.5-44.legacy.3.i386.rpm \
  2750.           glibc-common-2.2.5-44.legacy.3.i386.rpm \
  2751.           nscd-2.2.5-44.legacy.3.i386.rpm
  2752.          # mod_ssl-2.8.12-7.legacy.i386.rpm \
  2753.          # tripwire-2.3.1-10.1.legacy.7x.i386.rpm \
  2754.   RC1=$?
  2755.  
  2756.   # Check and finish
  2757.   if [ $RC1 = 0 ]
  2758.   then
  2759.  
  2760.     /etc/rc.d/init.d/httpd stop > /dev/null
  2761.     killall httpd 2> /dev/null
  2762.     sleep 5
  2763.     killall -9 httpd 2> /dev/null
  2764.     sleep 2
  2765.     /etc/rc.d/init.d/httpd start > /dev/null
  2766.     export PHPRC="/etc/hadmin";/usr/sbin/httpd -f /etc/hadmin/conf/httpd.conf;export -n PHPRC
  2767.     export PHPRC=/etc/hadmin;/usr/sbin/httpd -f /etc/hadmin/clientgw/conf/httpd.conf;export -n PHPRC
  2768.  
  2769.     touch $UPDDIR/3.0-82
  2770.     logger -t "$LOGTAG" "Update 3.0-82 Done."
  2771.   else
  2772.     logger -t "$LOGTAG" "Update 3.0-82 FAILED."
  2773.   fi
  2774. fi
  2775.  
  2776. ############################################################################
  2777. # Update 3.0-83b - 18/01/2005
  2778. # Bug fix for customized url filters
  2779. # Obsoletes : 3.0-83
  2780. ############################################################################
  2781.  
  2782. if [ ! \( -e $UPDDIR/3.0-83b \) ]
  2783. then
  2784.      # Download the files
  2785.      cd /tmp
  2786.      rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.0-83b.tgz .
  2787.  
  2788.      # Do the things ...
  2789.      tar xfz upd-3.0-83b.tgz --exclude usr/local/ --directory /
  2790.      RC=$?
  2791.      bash /usr/local/sbin/permslis
  2792.  
  2793.      # Check and finish
  2794.      if [ $RC = 0 ]
  2795.      then
  2796.          grep -v "dummy_first_line_as_squidguard_doesntlike_empty.base" /home/hadmin/cgi-bin/base/a_urls > /home/hadmin/cgi-bin/queue/a_urls
  2797.          grep -v "dummy_first_line_as_squidguard_doesntlike_empty.base" /home/hadmin/cgi-bin/base/a_domains > /home/hadmin/cgi-bin/queue/a_domains
  2798.          cp -f /home/hadmin/cgi-bin/base/a_expressions /home/hadmin/cgi-bin/queue
  2799.          grep -v "dummy_first_line_as_squidguard_doesntlike_empty.base" /home/hadmin/cgi-bin/base/perso_urls > /home/hadmin/cgi-bin/queue/perso_urls
  2800.          grep -v "dummy_first_line_as_squidguard_doesntlike_empty.base" /home/hadmin/cgi-bin/base/perso_domains > /home/hadmin/cgi-bin/queue/perso_domains
  2801.          cp -f /home/hadmin/cgi-bin/base/perso_expressions /home/hadmin/cgi-bin/queue
  2802.          cp -f /home/hadmin/cgi-bin/base/squidguard_databases /home/hadmin/cgi-bin/queue 
  2803.          /usr/local/sbin/process_filtrage_squidguard
  2804.          touch $UPDDIR/3.0-83b
  2805.          logger -t "$LOGTAG" "Update 3.0-83b Done."
  2806.      else
  2807.          logger -t "$LOGTAG" "Update 3.0-83b FAILED."
  2808.      fi
  2809. fi
  2810. ###
  2811.  
  2812. ###########################################################################
  2813. # Update 3.0-84 - 14/01/2005
  2814. # - Backports from SLIS 3.1:
  2815. #   - Installs sudo validation method
  2816. #   - Installs the DNS slave zone configurator into interface
  2817. # - New script clean_postgresql.sh (thanks to PHiL)
  2818. # - New rewriterules file for the reverse proxy
  2819. # Obsoletes :
  2820. ############################################################################
  2821.  
  2822. if [ ! \( -e $UPDDIR/3.0-84 \) ]
  2823. then
  2824.      # Download the files
  2825.      cd /tmp
  2826.      rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.0-84.tgz .
  2827.  
  2828.      # Do the things ...
  2829.      tar xfz upd-3.0-84.tgz --exclude usr/local/ --directory /
  2830.      RC=$?
  2831.      bash /usr/local/sbin/permslis
  2832.  
  2833.      # Check and finish
  2834.      if [ $RC = 0 ]
  2835.      then
  2836.  
  2837.        # Patch the database
  2838.        export PGPASSWORD=`grep ADMINPASS /home/hadmin/html/config_pgsql.inc.php |cut -d\" -f2`
  2839.        export PGUSER=`grep ADMINUSER /home/hadmin/html/config_pgsql.inc.php |cut -d\" -f2`
  2840.        psql -tqc "create sequence dnsslavezone_id start 1 increment 1;" hadmin
  2841.        psql -tqc "create table dnsslavezone (id int DEFAULT nextval('dnsslavezone_id'::text) not null, name varchar(255) not null, master varchar(255) not null, tovalid bool);" hadmin
  2842.        psql -tqc "create index id_dnsslavezone_key on dnsslavezone (id);" hadmin
  2843.  
  2844.        # Creates the sudo configuration for hadmin validation       
  2845.        chmod -R 750 /usr/share/slis/bin
  2846.        chown root.root /usr/share/slis/bin
  2847.        echo "
  2848. Host_Alias      LOCALHOST84 = $HOSTNAME
  2849. User_Alias      HADMIN84 = hadmin
  2850. Cmnd_Alias      SLIS_SCRIPTS = /usr/share/slis/bin/[a-z]*
  2851. HADMIN84          LOCALHOST84 = NOPASSWD:SLIS_SCRIPTS
  2852. " >> /etc/sudoers
  2853.  
  2854.          # Creates the empty log files for named
  2855.      mkdir -p /var/log/named
  2856.          touch /var/log/named/named.secu.log
  2857.          touch /var/log/named/named.req.log
  2858.          chown -R named /var/log/named
  2859.  
  2860.          # Remake the dns configuration
  2861.          /usr/local/sbin/mknamedconf > /etc/named.conf
  2862.          /usr/local/sbin/mknamedzones
  2863.          sleep 10
  2864.  
  2865.          # End of the update
  2866.          touch $UPDDIR/3.0-84
  2867.          logger -t "$LOGTAG" "Update 3.0-84 Done."
  2868.      else
  2869.          logger -t "$LOGTAG" "Update 3.0-84 FAILED."
  2870.      fi
  2871. fi
  2872. ###
  2873.  
  2874. ############################################################################
  2875. # Update 3.0-84b - 28/01/2005
  2876. # A patch for upd 3.0-84 (dns/index.php was missing)
  2877. # Obsoletes :
  2878. ############################################################################
  2879.  
  2880. if [ ! \( -e $UPDDIR/3.0-84b \) ]
  2881. then
  2882.      # Download the files
  2883.      cd /tmp
  2884.      rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.0-84b.tgz .
  2885.  
  2886.      # Do the things ...
  2887.      tar xfz upd-3.0-84b.tgz --exclude usr/local/ --directory /
  2888.      RC=$?
  2889.      bash /usr/local/sbin/permslis
  2890.  
  2891.      # Check and finish
  2892.      if [ $RC = 0 ]
  2893.      then
  2894.          touch $UPDDIR/3.0-84b
  2895.          logger -t "$LOGTAG" "Update 3.0-84b Done."
  2896.      else
  2897.          logger -t "$LOGTAG" "Update 3.0-84b FAILED."
  2898.      fi
  2899. fi
  2900. ###
  2901.  
  2902. ############################################################################
  2903. ### Update 3.0-85 - 2005-04-13
  2904. # SECURITY:
  2905. # Obsoletes :
  2906. ############################################################################
  2907.  
  2908. if [ ! \( -e $UPDDIR/3.0-85 \) ]
  2909. then
  2910.  
  2911.   # Download the files
  2912.   cd /tmp
  2913.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/cups-libs-1.1.14-15.4.4.legacy.i386.rpm .
  2914.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/cyrus-sasl-1.5.24-25.2.legacy.i386.rpm .
  2915.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/cyrus-sasl-md5-1.5.24-25.2.legacy.i386.rpm .
  2916.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/cyrus-sasl-plain-1.5.24-25.2.legacy.i386.rpm .
  2917.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/iptables-1.2.8-8.73.1.legacy.i386.rpm .
  2918.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/libpng-1.0.15-0.7x.1.legacy.i386.rpm .
  2919.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/mysql-3.23.58-1.73.5.legacy.i386.rpm .
  2920.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/php-4.1.2-7.3.16.legacy.i386.rpm .
  2921.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/php-imap-4.1.2-7.3.16.legacy.i386.rpm .
  2922.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/php-ldap-4.1.2-7.3.16.legacy.i386.rpm .
  2923.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/php-mysql-4.1.2-7.3.16.legacy.i386.rpm .
  2924.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/php-pgsql-4.1.2-7.3.16.legacy.i386.rpm .
  2925.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/vim-common-6.1-18.7x.2.3.legacy.i386.rpm .
  2926.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/vim-minimal-6.1-18.7x.2.3.legacy.i386.rpm .
  2927.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/zip-2.3-26.1.0.7.3.legacy.i386.rpm .
  2928.  
  2929.  
  2930.   # Do the things...
  2931.   rpm -F  cups-libs-1.1.14-15.4.4.legacy.i386.rpm \
  2932.           cyrus-sasl-1.5.24-25.2.legacy.i386.rpm \
  2933.           cyrus-sasl-md5-1.5.24-25.2.legacy.i386.rpm \
  2934.           cyrus-sasl-plain-1.5.24-25.2.legacy.i386.rpm \
  2935.           libpng-1.0.15-0.7x.1.legacy.i386.rpm \
  2936.           mysql-3.23.58-1.73.5.legacy.i386.rpm \
  2937.           php-4.1.2-7.3.16.legacy.i386.rpm \
  2938.           php-imap-4.1.2-7.3.16.legacy.i386.rpm \
  2939.           php-ldap-4.1.2-7.3.16.legacy.i386.rpm \
  2940.           php-mysql-4.1.2-7.3.16.legacy.i386.rpm \
  2941.           php-pgsql-4.1.2-7.3.16.legacy.i386.rpm \
  2942.           vim-common-6.1-18.7x.2.3.legacy.i386.rpm \
  2943.           vim-minimal-6.1-18.7x.2.3.legacy.i386.rpm \
  2944.           zip-2.3-26.1.0.7.3.legacy.i386.rpm
  2945.   RC1=$?
  2946.  
  2947.   # Check and finish
  2948.   if [ $RC1 = 0 ]
  2949.   then
  2950.     /etc/rc.d/init.d/httpd stop > /dev/null
  2951.     killall httpd 2> /dev/null
  2952.     sleep 5
  2953.     killall -9 httpd 2> /dev/null
  2954.     sleep 2
  2955.     /etc/rc.d/init.d/httpd start > /dev/null
  2956.     export PHPRC="/etc/hadmin";/usr/sbin/httpd -f /etc/hadmin/conf/httpd.conf;export -n PHPRC
  2957.     export PHPRC=/etc/hadmin;/usr/sbin/httpd -f /etc/hadmin/clientgw/conf/httpd.conf;export -n PHPRC
  2958.  
  2959.     touch $UPDDIR/3.0-85
  2960.     logger -t "$LOGTAG" "Update 3.0-85 Done."
  2961.   else
  2962.     logger -t "$LOGTAG" "Update 3.0-85 FAILED."
  2963.   fi
  2964. fi
  2965.  
  2966. ############################################################################
  2967. # Update 3.0-86 - 25/04/2005
  2968. # Security fix into LDAP configuration
  2969. # Obsoletes :
  2970. ############################################################################
  2971.  
  2972. if [ ! \( -e $UPDDIR/3.0-86 \) ]
  2973. then
  2974.      awk '{STRING=$0;if (sub(/lmPassword/,"ntPassword",STRING) && DONE !=1) {print STRING; DONE=1;}else print}' /etc/openldap/slapd.conf > /tmp/slapd.conf
  2975.      cp -f /etc/openldap/slapd.conf /etc/openldap/slapd.conf_3.0-86
  2976.      mv -f /tmp/slapd.conf /etc/openldap/slapd.conf
  2977.      /sbin/service ldap restart
  2978.      touch $UPDDIR/3.0-86
  2979.      logger -t "$LOGTAG" "Update 3.0-86 Done."
  2980. fi
  2981. ###
  2982.  
  2983.  
  2984. ############################################################################
  2985. ### Update 3.0-87 - 2005-05-24
  2986. # SECURITY: sudo, imap
  2987. # Obsoletes :
  2988. ############################################################################
  2989.  
  2990. if [ ! \( -e $UPDDIR/3.0-87 \) ]
  2991. then
  2992.  
  2993.   # Download the files
  2994.   cd /tmp
  2995.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/imap-2001a-10.1.legacy.i386.rpm .
  2996.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/sudo-1.6.5p2-2.2.legacy.i386.rpm .
  2997.  
  2998.  
  2999.   # Do the things...
  3000.   rpm -F  imap-2001a-10.1.legacy.i386.rpm \
  3001.           sudo-1.6.5p2-2.2.legacy.i386.rpm
  3002.   RC1=$?
  3003.  
  3004.   # Check and finish
  3005.   if [ $RC1 = 0 ]
  3006.   then
  3007.     touch $UPDDIR/3.0-87
  3008.     logger -t "$LOGTAG" "Update 3.0-87 Done."
  3009.   else
  3010.     logger -t "$LOGTAG" "Update 3.0-87 FAILED."
  3011.   fi
  3012. fi
  3013.  
  3014.  
  3015. ############################################################################
  3016. ### Update 3.0-88 - 2005-08-30
  3017. # SECURITY: sudo, imap
  3018. # Obsoletes :
  3019. ############################################################################
  3020.  
  3021. if [ ! \( -e $UPDDIR/3.0-88 \) ]
  3022. then
  3023.  
  3024.   # Download the files
  3025.   cd /tmp
  3026.    rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/apache-1.3.27-8.legacy.i386.rpm .
  3027.    rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/curl-7.9.5-2.2.legacy.i386.rpm .
  3028.    rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/dhcp-2.0pl5-8.2.legacy.i386.rpm .
  3029.    rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/gd-1.8.4-4.1.legacy.i386.rpm .
  3030.    rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/gzip-1.3.3-1.2.legacy.i386.rpm .
  3031.    rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/krb5-libs-1.2.4-16.1.legacy.i386.rpm .
  3032.    rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/libtiff-3.5.7-2.2.legacy.i386.rpm .
  3033.    rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/mysql-3.23.58-1.73.6.legacy.i386.rpm .
  3034.    rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/mysql-server-3.23.58-1.73.i386.rpm .
  3035.    rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/openssh-3.1p1-14.2.legacy.i386.rpm .
  3036.    rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/openssh-clients-3.1p1-14.2.legacy.i386.rpm .
  3037.    rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/openssh-server-3.1p1-14.2.legacy.i386.rpm .
  3038.    rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/openssl-0.9.6b-39.7.legacy.i386.rpm .
  3039.    rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/pam-0.75-46.10.legacy.7x.i386.rpm .
  3040.    rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/php-4.1.2-7.3.17.legacy.i386.rpm .
  3041.    rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/php-imap-4.1.2-7.3.17.legacy.i386.rpm .
  3042.    rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/php-ldap-4.1.2-7.3.17.legacy.i386.rpm .
  3043.    rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/php-mysql-4.1.2-7.3.17.legacy.i386.rpm .
  3044.    rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/php-pgsql-4.1.2-7.3.17.legacy.i386.rpm .
  3045.    rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/postgresql-7.2.7-1.2.legacy.i386.rpm .
  3046.    rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/postgresql-libs-7.2.7-1.2.legacy.i386.rpm .
  3047.    rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/postgresql-server-7.2.7-1.2.legacy.i386.rpm .
  3048.    rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/telnet-0.17-20.1.legacy.i386.rpm .
  3049.  
  3050.   # Do the things...
  3051.   rpm -F  apache-1.3.27-8.legacy.i386.rpm \
  3052.     curl-7.9.5-2.2.legacy.i386.rpm \
  3053.     dhcp-2.0pl5-8.2.legacy.i386.rpm \
  3054.     gd-1.8.4-4.1.legacy.i386.rpm \
  3055.     gzip-1.3.3-1.2.legacy.i386.rpm \
  3056.     krb5-libs-1.2.4-16.1.legacy.i386.rpm \
  3057.     libtiff-3.5.7-2.2.legacy.i386.rpm \
  3058.     mysql-3.23.58-1.73.6.legacy.i386.rpm \
  3059.     mysql-server-3.23.58-1.73.i386.rpm \
  3060.     openssh-3.1p1-14.2.legacy.i386.rpm \
  3061.     openssh-clients-3.1p1-14.2.legacy.i386.rpm \
  3062.     openssh-server-3.1p1-14.2.legacy.i386.rpm \
  3063.     openssl-0.9.6b-39.7.legacy.i386.rpm \
  3064.     pam-0.75-46.10.legacy.7x.i386.rpm \
  3065.     php-4.1.2-7.3.17.legacy.i386.rpm \
  3066.     php-imap-4.1.2-7.3.17.legacy.i386.rpm \
  3067.     php-ldap-4.1.2-7.3.17.legacy.i386.rpm \
  3068.     php-mysql-4.1.2-7.3.17.legacy.i386.rpm \
  3069.     php-pgsql-4.1.2-7.3.17.legacy.i386.rpm \
  3070.     postgresql-7.2.7-1.2.legacy.i386.rpm \
  3071.     postgresql-libs-7.2.7-1.2.legacy.i386.rpm \
  3072.     postgresql-server-7.2.7-1.2.legacy.i386.rpm \
  3073.     telnet-0.17-20.1.legacy.i386.rpm
  3074.   RC1=$?
  3075.  
  3076.   # Check and finish
  3077.   if [ $RC1 = 0 ]
  3078.   then
  3079.     touch $UPDDIR/3.0-88
  3080.     logger -t "$LOGTAG" "Update 3.0-88 Done."
  3081.   else
  3082.     logger -t "$LOGTAG" "Update 3.0-88 FAILED."
  3083.   fi
  3084. fi
  3085.  
  3086. ############################################################################
  3087. # Update 3.0-89 - 01/09/2005
  3088. # Mkfilters backport from SLIS 3.2 (Security: ssh brute-force protection)
  3089. # Obsoletes :
  3090. ############################################################################
  3091.  
  3092. if [ ! \( -e $UPDDIR/3.0-89 \) ]
  3093. then
  3094.      # Download the files
  3095.      cd /tmp
  3096.      rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/upd-3.0-89.tgz .
  3097.  
  3098.      # Do the things ...
  3099.      tar xfz upd-3.0-89.tgz --exclude usr/local/ --directory /
  3100.      RC=$?
  3101.      bash /usr/local/sbin/permslis
  3102.      /usr/local/sbin/mkfilters
  3103.  
  3104.      # Check and finish
  3105.      if [ $RC = 0 ]
  3106.      then
  3107.          touch $UPDDIR/3.0-89
  3108.          logger -t "$LOGTAG" "Update 3.0-89 Done."
  3109.      else
  3110.          logger -t "$LOGTAG" "Update 3.0-89 FAILED."
  3111.      fi
  3112. fi
  3113. ###
  3114.  
  3115.  
  3116. ############################################################################
  3117. ### Update 3.0-90 - 2005-12-01
  3118. # SECURITY: cups-libs, bzip2, glibc
  3119. # Obsoletes :
  3120. ############################################################################
  3121.  
  3122. if [ ! \( -e $UPDDIR/3.0-90 \) ]
  3123. then
  3124.  
  3125.   # Download the files
  3126.   cd /tmp
  3127.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/cups-libs-1.1.14-15.4.5.legacy.i386.rpm .
  3128.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/bzip2-libs-1.0.2-2.2.73.legacy.i386.rpm .
  3129.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/bzip2-1.0.2-2.2.73.legacy.i386.rpm .
  3130.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/glibc-2.2.5-44.legacy.6.i386.rpm .
  3131.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/glibc-common-2.2.5-44.legacy.6.i386.rpm .
  3132.  
  3133.   # Do the things...
  3134.   rpm -F  cups-libs-1.1.14-15.4.5.legacy.i386.rpm \
  3135.           bzip2-libs-1.0.2-2.2.73.legacy.i386.rpm \
  3136.           bzip2-1.0.2-2.2.73.legacy.i386.rpm \
  3137.           glibc-2.2.5-44.legacy.6.i386.rpm \
  3138.           glibc-common-2.2.5-44.legacy.6.i386.rpm
  3139.   RC1=$?
  3140.  
  3141.   # Check and finish
  3142.   if [ $RC1 = 0 ]
  3143.   then
  3144.     touch $UPDDIR/3.0-90
  3145.     logger -t "$LOGTAG" "Update 3.0-90 Done."
  3146.   else
  3147.     logger -t "$LOGTAG" "Update 3.0-90 FAILED."
  3148.   fi
  3149. fi
  3150.  
  3151. ############################################################################
  3152. ### Update 3.0-91 - 2006-02-15
  3153. # SECURITY: Legacy updates
  3154. # Obsoletes :
  3155. ############################################################################
  3156.  
  3157. if [ ! \( -e $UPDDIR/3.0-91 \) ]
  3158. then
  3159.  
  3160.   # Download the files
  3161.   cd /tmp
  3162.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/losetup-2.11n-12.7.3.2.legacy.i386.rpm .
  3163.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/lynx-2.8.4-18.3.legacy.i386.rpm .
  3164.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/mount-2.11n-12.7.3.2.legacy.i386.rpm .
  3165.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/mysql-3.23.58-1.73.9.legacy.i386.rpm .
  3166.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/openssl-0.9.6b-39.10.legacy.i386.rpm .
  3167.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/perl-5.6.1-38.0.7.3.3.legacy.i386.rpm .
  3168.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/perl-CGI-2.752-38.0.7.3.3.legacy.i386.rpm .
  3169.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/perl-CPAN-1.59_54-38.0.7.3.3.legacy.i386.rpm .
  3170.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/perl-DB_File-1.75-38.0.7.3.3.legacy.i386.rpm .
  3171.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/perl-NDBM_File-1.75-38.0.7.3.3.legacy.i386.rpm .
  3172.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/perl-suidperl-5.6.1-38.0.7.3.3.legacy.i386.rpm .
  3173.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/php-4.1.2-7.3.18.legacy.i386.rpm .
  3174.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/php-imap-4.1.2-7.3.18.legacy.i386.rpm .
  3175.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/php-ldap-4.1.2-7.3.18.legacy.i386.rpm .
  3176.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/php-mysql-4.1.2-7.3.18.legacy.i386.rpm .
  3177.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/php-pgsql-4.1.2-7.3.18.legacy.i386.rpm .
  3178.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/util-linux-2.11n-12.7.3.2.legacy.i386.rpm .
  3179.  
  3180.   # Do the things...
  3181.   rpm -F --nodeps losetup-2.11n-12.7.3.2.legacy.i386.rpm \
  3182.     lynx-2.8.4-18.3.legacy.i386.rpm \
  3183.     mount-2.11n-12.7.3.2.legacy.i386.rpm \
  3184.     mysql-3.23.58-1.73.9.legacy.i386.rpm \
  3185.     openssl-0.9.6b-39.10.legacy.i386.rpm \
  3186.     perl-5.6.1-38.0.7.3.3.legacy.i386.rpm \
  3187.     perl-CGI-2.752-38.0.7.3.3.legacy.i386.rpm \
  3188.     perl-CPAN-1.59_54-38.0.7.3.3.legacy.i386.rpm \
  3189.     perl-DB_File-1.75-38.0.7.3.3.legacy.i386.rpm \
  3190.     perl-NDBM_File-1.75-38.0.7.3.3.legacy.i386.rpm \
  3191.     perl-suidperl-5.6.1-38.0.7.3.3.legacy.i386.rpm \
  3192.     php-4.1.2-7.3.18.legacy.i386.rpm \
  3193.     php-imap-4.1.2-7.3.18.legacy.i386.rpm \
  3194.     php-ldap-4.1.2-7.3.18.legacy.i386.rpm \
  3195.     php-mysql-4.1.2-7.3.18.legacy.i386.rpm \
  3196.     php-pgsql-4.1.2-7.3.18.legacy.i386.rpm \
  3197.     util-linux-2.11n-12.7.3.2.legacy.i386.rpm
  3198.   RC1=$?
  3199.  
  3200.   # Check and finish
  3201.   if [ $RC1 = 0 ]
  3202.   then
  3203.     touch $UPDDIR/3.0-91
  3204.     logger -t "$LOGTAG" "Update 3.0-91 Done."
  3205.   else
  3206.     logger -t "$LOGTAG" "Update 3.0-91 FAILED."
  3207.   fi
  3208. fi
  3209. #####
  3210.  
  3211. ############################################################################
  3212. ### Update 3.0-92 - 2006-04-05
  3213. # SECURITY: Fedora Legacy updates
  3214. # Obsoletes :
  3215. ############################################################################
  3216.  
  3217. if [ ! \( -e $UPDDIR/3.0-92 \) ]
  3218. then
  3219.  
  3220.   # Download the files
  3221.   cd /tmp
  3222.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/apache-1.3.27-9.legacy.i386.rpm .
  3223.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/auth_ldap-1.6.0-4.2.legacy.i386.rpm .
  3224.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/openssh-3.1p1-14.3.legacy.i386.rpm .
  3225.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/openssh-clients-3.1p1-14.3.legacy.i386.rpm .
  3226.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/openssh-server-3.1p1-14.3.legacy.i386.rpm .
  3227.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/pcre-3.9-2.1.legacy.i386.rpm .
  3228.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/perl-DBI-1.21-1.1.legacy.i386.rpm .
  3229.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/sendmail-8.12.11-4.22.10.legacy.i386.rpm .
  3230.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/squid-2.4.STABLE7-0.73.3.legacy.i386.rpm .
  3231.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/sudo-1.6.5p2-2.3.legacy.i386.rpm .
  3232.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/tar-1.13.25-4.7.2.legacy.i386.rpm .
  3233.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/unzip-5.50-31.1.legacy.i386.rpm .
  3234.  
  3235.   # Do the things...
  3236.   rpm -F apache-1.3.27-9.legacy.i386.rpm \
  3237.     auth_ldap-1.6.0-4.2.legacy.i386.rpm \
  3238.     openssh-3.1p1-14.3.legacy.i386.rpm \
  3239.     openssh-clients-3.1p1-14.3.legacy.i386.rpm \
  3240.     openssh-server-3.1p1-14.3.legacy.i386.rpm \
  3241.     pcre-3.9-2.1.legacy.i386.rpm \
  3242.     perl-DBI-1.21-1.1.legacy.i386.rpm \
  3243.     sendmail-8.12.11-4.22.10.legacy.i386.rpm \
  3244.     squid-2.4.STABLE7-0.73.3.legacy.i386.rpm \
  3245.     sudo-1.6.5p2-2.3.legacy.i386.rpm \
  3246.     tar-1.13.25-4.7.2.legacy.i386.rpm \
  3247.     unzip-5.50-31.1.legacy.i386.rpm
  3248.  
  3249.   RC1=$?
  3250.  
  3251.   # Check and finish
  3252.   if [ $RC1 = 0 ]
  3253.   then
  3254.     touch $UPDDIR/3.0-92
  3255.     logger -t "$LOGTAG" "Update 3.0-92 Done."
  3256.   else
  3257.     logger -t "$LOGTAG" "Update 3.0-92 FAILED."
  3258.   fi
  3259. fi
  3260.  
  3261. ############################################################################
  3262. ### Update 3.x-33i - 2006-04-05
  3263. # SECURITY: kernel
  3264. # Obsoletes : 3.x-33 3.x-33b 3.x-33c 3.x-33d 3.x-33e 3.x-33f 3.x-33g 3.x-33h
  3265. # Fixed 2003-09-18: modutils missing when the SLIS is new
  3266. ############################################################################
  3267.  
  3268. declare -i HOUR
  3269. HOUR=`date +%k`
  3270. R=$RANDOM
  3271. #if [ ! \( -e $UPDDIR/3.x-33i \) -a $HOUR -lt 6 -a $R -lt 10000 ]
  3272. if [ ! \( -e $UPDDIR/3.x-33i \) -a $HOUR -lt 6 ]
  3273. #if [ ! \( -e $UPDDIR/3.x-33i \) ]
  3274. then
  3275.  
  3276.   # Check which kernel to download
  3277.   if [ "`/bin/uname -v|/bin/grep SMP`" = "" ]
  3278.   then
  3279.     SMP=""
  3280.   else
  3281.     SMP="-smp"
  3282.   fi
  3283.   CPU=`uname -m`
  3284.  
  3285.   # Download the files
  3286.   cd /tmp
  3287.  
  3288.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/kernel$SMP-2.4.20-46.7.legacy.$CPU.rpm .
  3289.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/modutils-2.4.18-3.7x.i386.rpm .
  3290.   rsync rsync://$RSYNC_HOST/$RSYNC_MODULE/quota-3.06-9.7.i386.rpm .
  3291.  
  3292.   # Do the things...
  3293.   rpm -F quota-3.06-9.7.i386.rpm
  3294.   rpm -F kernel$SMP-2.4.20-46.7.legacy.$CPU.rpm modutils-2.4.18-3.7x.i386.rpm
  3295.   RC1=$?
  3296.  
  3297.   # Check and finish
  3298.   if [ $RC1 = 0 ]
  3299.   then
  3300.     rm -f kernel*.rpm # Space optimization 2003-11-25
  3301.     touch $UPDDIR/3.x-33i
  3302.     perl -pi -e "s/Red Hat Linux/SLIS3 (RedHat)/" /boot/grub/grub.conf
  3303.     logger -t "$LOGTAG" "Kernel update 3.x-33i done: rebooting now".
  3304.     /sbin/reboot
  3305.     killall slis_update
  3306.     killall slis_update.dev
  3307.   else
  3308.     logger -t "$LOGTAG" "Update 3.x-33i FAILED."
  3309.   fi
  3310. fi
  3311. ###
  3312.  
  3313. ############################################################################
  3314. # Update 3.0-93 - 07/04/2005
  3315. # Fix for sendmail update that broked the sendmail.cf file
  3316. # Obsoletes :
  3317. ############################################################################
  3318.  
  3319. if [ ! \( -e $UPDDIR/3.0-93 \) ]
  3320. then
  3321.  
  3322.      /usr/local/sbin/mksendmailcf
  3323.      /etc/init.d/sendmail restart
  3324.  
  3325.      touch $UPDDIR/3.0-93
  3326.      logger -t "$LOGTAG" "Update 3.0-93 Done."
  3327. fi
  3328. ###
  3329.  
  3330.  
  3331. ############################################################################
  3332. ### NOTIFY update - 05/09/2002
  3333. # Notify installation of a new SLIS
  3334. # Obsoletes :
  3335. ############################################################################
  3336.  
  3337. if [ ! \( -e $UPDDIR/NOTIFY-3.0 \) ]
  3338. then
  3339.   echo "$HOSTNAME installed" | mail -s "New SLIS 3.0" $SLISMASTER
  3340.   sleep 2
  3341.   /usr/lib/sendmail -q
  3342.   killall crond
  3343.   sleep 1
  3344.   crond
  3345.  
  3346.   touch $UPDDIR/NOTIFY-3.0
  3347.   logger -t "$LOGTAG" "NOTIFY sent."
  3348. fi
  3349. ###
  3350.  
  3351. ##############################
  3352. logger -t "$LOGTAG" "Script Version 3.0 ended."
  3353.  
  3354. /bin/rm -rf /var/lock/slis_upd
  3355.