Avoid use of symbolic link /sbin/shorewall from init scripts

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4052 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2006-06-10 13:32:56 +00:00
parent 8884d5ba59
commit d465f2258f
7 changed files with 22 additions and 15 deletions

View File

@ -20,7 +20,7 @@ DAEMON_NAME="shorewall" # of course shorewall is NOT a deamon.
case "$1" in
start)
stat_busy "Starting $DAEMON_NAME"
/sbin/shorewall $OPTIONS start &>/dev/null
/usr/share/shorewall-lite/shorewall $OPTIONS start &>/dev/null
if [ $? -gt 0 ]; then
stat_fail
else
@ -32,7 +32,7 @@ case "$1" in
stop)
stat_busy "Stopping $DAEMON_NAME"
/sbin/shorewall stop &>/dev/null
/usr/share/shorewall-lite/shorewall stop &>/dev/null
if [ $? -gt 0 ]; then
stat_fail
else
@ -43,7 +43,7 @@ case "$1" in
restart|reload)
stat_busy "Restarting $DAEMON_NAME"
/sbin/shorewall restart &>/dev/null
/usr/share/shorewall-lite/shorewall restart &>/dev/null
if [ $? -gt 0 ]; then
stat_fail
else

View File

@ -1,6 +1,6 @@
#!/bin/sh
SRWL=/sbin/shorewall
SRWL=/usr/share/shorewall-lite/shorewall
WAIT_FOR_IFUP=/usr/share/shorewall/wait4ifup
# Note, set INITLOG to /dev/null if you do not want to
# keep logs of the firewall (not recommended)

View File

@ -74,14 +74,14 @@ command="$1"
case "$command" in
start)
exec /sbin/shorewall $OPTIONS $@
exec /usr/share/shorewall-lite/shorewall $OPTIONS $@
;;
stop|restart|status)
exec /sbin/shorewall $@
exec /usr/share/shorewall-lite/shorewall $@
;;
reload)
shift
exec /sbin/shorewall restart $@
exec /usr/share/shorewall-lite/shorewall restart $@
;;
*)
usage

View File

@ -20,7 +20,7 @@ DAEMON_NAME="shorewall" # of course shorewall is NOT a deamon.
case "$1" in
start)
stat_busy "Starting $DAEMON_NAME"
/sbin/shorewall $OPTIONS start &>/dev/null
/usr/share/shorewall/shorewall $OPTIONS start &>/dev/null
if [ $? -gt 0 ]; then
stat_fail
else
@ -32,7 +32,7 @@ case "$1" in
stop)
stat_busy "Stopping $DAEMON_NAME"
/sbin/shorewall stop &>/dev/null
/usr/share/shorewall/shorewall stop &>/dev/null
if [ $? -gt 0 ]; then
stat_fail
else
@ -43,7 +43,7 @@ case "$1" in
restart|reload)
stat_busy "Restarting $DAEMON_NAME"
/sbin/shorewall restart &>/dev/null
/usr/share/shorewall restart &>/dev/null
if [ $? -gt 0 ]; then
stat_fail
else

View File

@ -1,6 +1,6 @@
#!/bin/sh
SRWL=/sbin/shorewall
SRWL=/usr/share/shorewall/shorewall
WAIT_FOR_IFUP=/usr/share/shorewall/wait4ifup
# Note, set INITLOG to /dev/null if you do not want to
# keep logs of the firewall (not recommended)

View File

@ -74,14 +74,14 @@ command="$1"
case "$command" in
start)
exec /sbin/shorewall $OPTIONS $@
exec /usr/share/shorewall/shorewall $OPTIONS $@
;;
stop|restart|status)
exec /sbin/shorewall $@
exec /usr/share/shorewall/shorewall $@
;;
reload)
shift
exec /sbin/shorewall restart $@
exec /usr/share/shorewall/shorewall restart $@
;;
*)
usage

View File

@ -276,6 +276,9 @@
<para>Modify <filename>/etc/shorewall-lite/shorewall.conf</filename>
as needed.</para>
<para>If you are running Debian or one of its derivatives like Ubuntu
then edit /etc/default/shorewall-lite and set startup=1.</para>
<programlisting><command>shorewall start</command></programlisting>
</listitem>
</orderedlist>
@ -395,6 +398,10 @@
<para>Modify <filename>/etc/shorewall-lite/shorewall.conf</filename>
as needed.</para>
<para>If you are running Debian or one of its derivatives like
Ubuntu then edit /etc/default/shorewall-lite and set
startup=1.</para>
<programlisting><command>shorewall start</command></programlisting>
</listitem>
</orderedlist>
@ -495,4 +502,4 @@ MANGLE_FORWARD # Mangle table has FORWARD chain</programlisting
is the level specified in the shorewall.conf file used when then program
was compiled.</para>
</section>
</article>
</article>