From 5f0b85b5b9b176b2017bb78d1acc08a288a1bc14 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Tue, 30 Oct 2012 09:49:53 -0700 Subject: [PATCH] Replace a couple of more hard-coded directory names. Signed-off-by: Tom Eastep --- Shorewall/Perl/lib.core | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Shorewall/Perl/lib.core b/Shorewall/Perl/lib.core index d03628e25..9d48337a2 100644 --- a/Shorewall/Perl/lib.core +++ b/Shorewall/Perl/lib.core @@ -838,13 +838,13 @@ detect_dynamic_gateway() { # $1 = interface gateway=$( find_peer $($IP addr list $interface ) ) fi - if [ -z "$gateway" -a -f /var/lib/dhcpcd/dhcpcd-${1}.info ]; then - eval $(grep ^GATEWAYS= /var/lib/dhcpcd/dhcpcd-${1}.info 2> /dev/null) + if [ -z "$gateway" -a -f ${VARLIB}/dhcpcd/dhcpcd-${1}.info ]; then + eval $(grep ^GATEWAYS= ${VARLIB}/dhcpcd/dhcpcd-${1}.info 2> /dev/null) [ -n "$GATEWAYS" ] && GATEWAYS=${GATEWAYS%,*} && gateway=$GATEWAYS fi - if [ -z "$gateway" -a -f /var/lib/dhcp/dhclient-${1}.lease ]; then - gateway=$(grep 'option routers' /var/lib/dhcp/dhclient-${1}.lease | tail -n 1 | while read j1 j2 gateway; do echo $gateway ; return 0; done) + if [ -z "$gateway" -a -f ${VARLIB}/dhcp/dhclient-${1}.lease ]; then + gateway=$(grep 'option routers' ${VARLIB}/dhcp/dhclient-${1}.lease | tail -n 1 | while read j1 j2 gateway; do echo $gateway ; return 0; done) fi [ -n "$gateway" ] && echo $gateway