forked from extern/shorewall_code
Correct issues found in Fedora Testing
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
bcf419fbce
commit
f9d187c288
@ -68,7 +68,22 @@ elif [ -f /etc/SuSE-release ]; then
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
|
#
|
||||||
|
# Assume RedHat/Fedora/CentOS/Foobar/...
|
||||||
|
#
|
||||||
|
IFACE="$1"
|
||||||
|
|
||||||
|
case $0 in
|
||||||
|
*ifup*)
|
||||||
|
COMMAND=up
|
||||||
|
;;
|
||||||
|
*ifdown*)
|
||||||
|
COMMAND=down
|
||||||
|
;;
|
||||||
|
*)
|
||||||
exit 0
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for PRODUCT in $PRODUCTS; do
|
for PRODUCT in $PRODUCTS; do
|
||||||
|
@ -63,7 +63,7 @@ shorewall_start () {
|
|||||||
vardir=/var/lib/$product
|
vardir=/var/lib/$product
|
||||||
[ -f /etc/$PRODUCT/vardir ] && . /etc/$PRODUCT/vardir
|
[ -f /etc/$PRODUCT/vardir ] && . /etc/$PRODUCT/vardir
|
||||||
if [ -x ${vardir}/firewall ]; then
|
if [ -x ${vardir}/firewall ]; then
|
||||||
${vardir}/firewall close || notdone
|
${vardir}/firewall stop || notdone
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -131,6 +131,7 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
|
|||||||
#
|
#
|
||||||
DEBIAN=
|
DEBIAN=
|
||||||
SUSE=
|
SUSE=
|
||||||
|
REDHAT=
|
||||||
|
|
||||||
case $(uname) in
|
case $(uname) in
|
||||||
*)
|
*)
|
||||||
@ -159,6 +160,11 @@ elif [ -f /etc/arch-release ] ; then
|
|||||||
DEST="/etc/rc.d"
|
DEST="/etc/rc.d"
|
||||||
INIT="shorewall-init"
|
INIT="shorewall-init"
|
||||||
ARCHLINUX=yes
|
ARCHLINUX=yes
|
||||||
|
else
|
||||||
|
#
|
||||||
|
# Assume RedHat
|
||||||
|
#
|
||||||
|
REDHAT=Yes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -237,6 +243,13 @@ if [ -z "$PREFIX" ]; then
|
|||||||
if [ -n "$SUSE" ]; then
|
if [ -n "$SUSE" ]; then
|
||||||
ln -sf /usr/share/shorewall-init/ifupdown /etc/sysconfig/network/if-up.d/shorewall
|
ln -sf /usr/share/shorewall-init/ifupdown /etc/sysconfig/network/if-up.d/shorewall
|
||||||
ln -sf /usr/share/shorewall-init/ifupdown /etc/sysconfig/network/if-down.d/shorewall
|
ln -sf /usr/share/shorewall-init/ifupdown /etc/sysconfig/network/if-down.d/shorewall
|
||||||
|
elif [ -n "$REDHAT" ]; then
|
||||||
|
if [ -f /sbin/ifup-local -o -f /sbin/ifdown-local ]; then
|
||||||
|
echo "WARNING: /sbin/ifup-local and/or /sbin/ifdown-local already exist; up/down events will not be handled"
|
||||||
|
else
|
||||||
|
ln -s /usr/share/shorewall-init/ifupdown /sbin/ifup-local
|
||||||
|
ln -s /usr/share/shorewall-init/ifupdown /sbin/ifdown-local
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
|
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
|
||||||
|
@ -1214,6 +1214,10 @@ sub verify_required_interfaces() {
|
|||||||
$interfaces = find_interfaces_by_option 'required';
|
$interfaces = find_interfaces_by_option 'required';
|
||||||
|
|
||||||
if ( @$interfaces ) {
|
if ( @$interfaces ) {
|
||||||
|
emit( 'case "$COMMAND" in' );
|
||||||
|
push_indent;
|
||||||
|
emit( 'start|restart|restore|refresh)' );
|
||||||
|
push_indent;
|
||||||
for my $interface (@$interfaces ) {
|
for my $interface (@$interfaces ) {
|
||||||
my $physical = get_physical $interface;
|
my $physical = get_physical $interface;
|
||||||
|
|
||||||
@ -1222,6 +1226,11 @@ sub verify_required_interfaces() {
|
|||||||
emit qq(fi\n);
|
emit qq(fi\n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
emit( ';;' );
|
||||||
|
pop_indent;
|
||||||
|
pop_indent;
|
||||||
|
emit( 'esac' );
|
||||||
|
|
||||||
$returnvalue = 1;
|
$returnvalue = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user