1
0

patch-install_sh 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. $Id$
  2. --- shorewall-common-4.0.7.orig/install.sh 2007-12-26 22:15:47.000000000 +0100
  3. +++ shorewall-common-4.0.7/install.sh 2009-12-11 23:10:40.000000000 +0100
  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. @@ -683,15 +662,18 @@ fi
  49. cd manpages
  50. +run_install -d ${PREFIX}/usr/share/man/man5
  51. +run_install -d ${PREFIX}/usr/share/man/man8
  52. +
  53. for f in *.5; do
  54. gzip -c $f > $f.gz
  55. - run_install -D -m 0644 $f.gz ${PREFIX}/usr/share/man/man5/$f.gz
  56. + run_install -m 0644 $f.gz ${PREFIX}/usr/share/man/man5/$f.gz
  57. echo "Man page $f.gz installed to /usr/share/man/man5/$f.gz"
  58. done
  59. for f in *.8; do
  60. gzip -c $f > $f.gz
  61. - run_install -D -m 0644 $f.gz ${PREFIX}/usr/share/man/man8/$f.gz
  62. + run_install -m 0644 $f.gz ${PREFIX}/usr/share/man/man8/$f.gz
  63. echo "Man page $f.gz installed to /usr/share/man/man8/$f.gz"
  64. done
  65. @@ -704,43 +686,6 @@ echo "Man Pages Installed"
  66. #
  67. install_file firewall ${PREFIX}/usr/share/shorewall/firewall 0755
  68. -if [ -z "$PREFIX" -a -n "$first_install" ]; then
  69. - if [ -n "$DEBIAN" ]; then
  70. - run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall
  71. - ln -s ../init.d/shorewall /etc/rcS.d/S40shorewall
  72. - echo "shorewall will start automatically at boot"
  73. - echo "Set startup=1 in /etc/default/shorewall to enable"
  74. - touch /var/log/shorewall-init.log
  75. - 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
  76. - else
  77. - if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
  78. - if insserv /etc/init.d/shorewall ; then
  79. - echo "shorewall will start automatically at boot"
  80. - echo "Set STARTUP_ENABLED=Yes in /etc/shorewall/shorewall.conf to enable"
  81. - else
  82. - cant_autostart
  83. - fi
  84. - elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then
  85. - if chkconfig --add shorewall ; then
  86. - echo "shorewall will start automatically in run levels as follows:"
  87. - echo "Set STARTUP_ENABLED=Yes in /etc/shorewall/shorewall.conf to enable"
  88. - chkconfig --list shorewall
  89. - else
  90. - cant_autostart
  91. - fi
  92. - elif [ -x /sbin/rc-update ]; then
  93. - if rc-update add shorewall default; then
  94. - echo "shorewall will start automatically at boot"
  95. - echo "Set STARTUP_ENABLED=Yes in /etc/shorewall/shorewall.conf to enable"
  96. - else
  97. - cant_autostart
  98. - fi
  99. - elif [ "$INIT" != rc.firewall ]; then #Slackware starts this automatically
  100. - cant_autostart
  101. - fi
  102. - fi
  103. -fi
  104. -
  105. #
  106. # Report Success
  107. #