home *** CD-ROM | disk | FTP | other *** search
/ chilidog.highland.cc.ks.us / chilidog.highland.cc.ks.us.zip / chilidog.highland.cc.ks.us / backup / bradford.20110502.etc.tar.gz / bradford.20110502.etc.tar / etc / sysconfig / scripts / SuSEfirewall2-oldbroadcast < prev    next >
Text File  |  2006-04-22  |  3KB  |  96 lines

  1. #!/bin/sh
  2. #
  3. # SuSEfirewall2-oldbroadcast - helper script for SuSEfirewall2
  4. # Copyright (C) 2005 SUSE LINUX Products GmbH
  5. #
  6. # Author: Ludwig Nussel
  7. # Please send feedback via http://www.suse.de/feedback
  8. #
  9. # This program is free software; you can redistribute it and/or
  10. # modify it under the terms of the GNU General Public License
  11. # version 2 as published by the Free Software Foundation.
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. # GNU General Public License for more details.
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  19.  
  20. # Convert obsolete FW_ALLOW_FW_BROADCAST and FW_IGNORE_FW_BROADCAST into new
  21. # variables. Attention: do not use any special functions as this script is also
  22. # used in post-install of SuSEfirewall2!
  23. #
  24. convert_old_broadcast()
  25. {
  26.     local i zone
  27.  
  28.     for i in $FW_ALLOW_FW_BROADCAST; do
  29.     case "$i" in
  30.         no) ;;
  31.         yes)
  32.         warning "FW_ALLOW_FW_BROADCAST=yes is obsolete, use FW_ALLOW_FW_BROADCAST_{INT,EXT,DMZ}=yes instead"
  33.         for zone in INT EXT DMZ; do
  34.             eval FW_ALLOW_FW_BROADCAST_$zone=yes
  35.         done
  36.         ;;
  37.         int)
  38.             warning "FW_ALLOW_FW_BROADCAST=$i is obsolete, use FW_ALLOW_FW_BROADCAST_INT=yes instead"
  39.             FW_ALLOW_FW_BROADCAST_INT=yes
  40.         ;;
  41.         ext)
  42.             warning "FW_ALLOW_FW_BROADCAST=$i is obsolete, use FW_ALLOW_FW_BROADCAST_EXT=yes instead"
  43.             FW_ALLOW_FW_BROADCAST_EXT=yes
  44.         ;;
  45.         dmz)
  46.             warning "FW_ALLOW_FW_BROADCAST=$i is obsolete, use FW_ALLOW_FW_BROADCAST_DMZ=yes instead"
  47.             FW_ALLOW_FW_BROADCAST_DMZ=yes
  48.         ;;
  49.         *)
  50.         warning "FW_ALLOW_FW_BROADCAST=$i is obsolete, use FW_ALLOW_FW_BROADCAST_{INT,EXT,DMZ}=$i instead"
  51.         for zone in INT EXT DMZ; do
  52.             eval FW_ALLOW_FW_BROADCAST_$zone="$i"
  53.         done
  54.         ;;
  55.     esac
  56.     done
  57.     unset FW_ALLOW_FW_BROADCAST
  58.  
  59.     # backward compat
  60.     for i in $FW_IGNORE_FW_BROADCAST; do
  61.     case "$i" in
  62.         no) ;;
  63.         yes)
  64.         warning "FW_IGNORE_FW_BROADCAST=yes is obsolete, use FW_IGNORE_FW_BROADCAST_{INT,EXT,DMZ}=yes instead"
  65.         for zone in INT EXT DMZ; do
  66.             eval FW_IGNORE_FW_BROADCAST_$zone=yes
  67.         done
  68.         ;;
  69.         int)
  70.             warning "FW_IGNORE_FW_BROADCAST=$i is obsolete, use FW_IGNORE_FW_BROADCAST_INT=yes instead"
  71.             FW_IGNORE_FW_BROADCAST_INT=yes
  72.         ;;
  73.         ext)
  74.             warning "FW_IGNORE_FW_BROADCAST=$i is obsolete, use FW_IGNORE_FW_BROADCAST_EXT=yes instead"
  75.             FW_IGNORE_FW_BROADCAST_EXT=yes
  76.         ;;
  77.         dmz)
  78.             warning "FW_IGNORE_FW_BROADCAST=$i is obsolete, use FW_IGNORE_FW_BROADCAST_DMZ=yes instead"
  79.             FW_IGNORE_FW_BROADCAST_DMZ=yes
  80.         ;;
  81.         *)
  82.         warning "FW_IGNORE_FW_BROADCAST=$i is obsolete, use FW_IGNORE_FW_BROADCAST_{INT,EXT,DMZ}=$i instead"
  83.         for zone in INT EXT DMZ; do
  84.             eval FW_IGNORE_FW_BROADCAST_$zone="$i"
  85.         done
  86.         ;;
  87.     esac
  88.     done
  89.     unset FW_IGNORE_FW_BROADCAST
  90. }
  91.  
  92.