patch-install_sh 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. $Id$
  2. --- shorewall-common-4.0.5.orig/install.sh 2007-10-19 16:33:06.000000000 +0000
  3. +++ shorewall-common-4.0.5/install.sh 2007-10-23 23:33:47.000000000 +0000
  4. @@ -183,7 +183,6 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/
  5. #
  6. # Determine where to install the firewall script
  7. #
  8. -DEBIAN=
  9. OWNERSHIP="-o $OWNER -g $GROUP"
  10. @@ -198,16 +197,6 @@ if [ -n "$PREFIX" ]; then
  11. else
  12. [ -x /usr/share/shorewall-shell/compiler -o -x /usr/share/shorewall-perl/compiler.pl ] || \
  13. { echo " ERROR: No Shorewall compiler is installed" >&2; exit 1; }
  14. - if [ -d /etc/apt -a -e /usr/bin/dpkg ]; then
  15. - DEBIAN=yes
  16. - elif [ -f /etc/slackware-version ] ; then
  17. - DEST="/etc/rc.d"
  18. - INIT="rc.firewall"
  19. - elif [ -f /etc/arch-release ] ; then
  20. - DEST="/etc/rc.d"
  21. - INIT="shorewall"
  22. - ARCHLINUX=yes
  23. - fi
  24. fi
  25. #
  26. @@ -238,14 +227,7 @@ echo "shorewall control program installe
  27. #
  28. # Install the Firewall Script
  29. #
  30. -if [ -n "$DEBIAN" ]; then
  31. - install_file_with_backup init.debian.sh /etc/init.d/shorewall 0544 ${PREFIX}/usr/share/shorewall-${VERSION}.bkout
  32. -elif [ -n "$ARCHLINUX" ]; then
  33. - install_file_with_backup init.archlinux.sh ${PREFIX}${DEST}/$INIT 0544 ${PREFIX}/usr/share/shorewall-${VERSION}.bkout
  34. -
  35. -else
  36. - install_file_with_backup init.sh ${PREFIX}${DEST}/$INIT 0544 ${PREFIX}/usr/share/shorewall-${VERSION}.bkout
  37. -fi
  38. +install_file_with_backup init.sh ${PREFIX}${DEST}/$INIT 0544 ${PREFIX}/usr/share/shorewall-${VERSION}.bkout
  39. echo "Shorewall script installed in ${PREFIX}${DEST}/$INIT"
  40. @@ -273,9 +255,6 @@ if [ ! -f ${PREFIX}/etc/shorewall/shorew
  41. fi
  42. -if [ -n "$ARCHLINUX" ] ; then
  43. - sed -e 's!LOGFILE=/var/log/messages!LOGFILE=/var/log/messages.log!' -i ${PREFIX}/etc/shorewall/shorewall.conf
  44. -fi
  45. #
  46. # Install the zones file
  47. #
  48. @@ -704,43 +683,6 @@ echo "Man Pages Installed"
  49. #
  50. install_file firewall ${PREFIX}/usr/share/shorewall/firewall 0755
  51. -if [ -z "$PREFIX" -a -n "$first_install" ]; then
  52. - if [ -n "$DEBIAN" ]; then
  53. - run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall
  54. - ln -s ../init.d/shorewall /etc/rcS.d/S40shorewall
  55. - echo "shorewall will start automatically at boot"
  56. - echo "Set startup=1 in /etc/default/shorewall to enable"
  57. - touch /var/log/shorewall-init.log
  58. - qt mywhich perl && perl -p -w -i -e 's/^STARTUP_ENABLED=No/STARTUP_ENABLED=Yes/;s/^IP_FORWARDING=On/IP_FORWARDING=Keep/;s/^SUBSYSLOCK=.*/SUBSYSLOCK=/;' /etc/shorewall/shorewall.conf
  59. - else
  60. - if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
  61. - if insserv /etc/init.d/shorewall ; then
  62. - echo "shorewall will start automatically at boot"
  63. - echo "Set STARTUP_ENABLED=Yes in /etc/shorewall/shorewall.conf to enable"
  64. - else
  65. - cant_autostart
  66. - fi
  67. - elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then
  68. - if chkconfig --add shorewall ; then
  69. - echo "shorewall will start automatically in run levels as follows:"
  70. - echo "Set STARTUP_ENABLED=Yes in /etc/shorewall/shorewall.conf to enable"
  71. - chkconfig --list shorewall
  72. - else
  73. - cant_autostart
  74. - fi
  75. - elif [ -x /sbin/rc-update ]; then
  76. - if rc-update add shorewall default; then
  77. - echo "shorewall will start automatically at boot"
  78. - echo "Set STARTUP_ENABLED=Yes in /etc/shorewall/shorewall.conf to enable"
  79. - else
  80. - cant_autostart
  81. - fi
  82. - elif [ "$INIT" != rc.firewall ]; then #Slackware starts this automatically
  83. - cant_autostart
  84. - fi
  85. - fi
  86. -fi
  87. -
  88. #
  89. # Report Success
  90. #