From 4d1b4df43b980bd7ac8f2e40d6476bcdca8bf0b6 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sun, 24 Mar 2019 21:38:59 -0400 Subject: derp --- src/start_slip.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/start_slip.sh b/src/start_slip.sh index 5126756..ffb2a08 100755 --- a/src/start_slip.sh +++ b/src/start_slip.sh @@ -69,9 +69,9 @@ ifconfig $SLIP_IFACE $LOCAL_IP pointopoint $REMOTE_IP if [ "$IP_MASQUERADE" = "yes" ]; then if [ "$MASQ_IFACE" = "" ]; then - /sbin/ip route show 2>/dev/null | sed -n 's,^default.*dev *\([^ ]*\).*$,\1,p' + MASQ_IFACE="$(/sbin/ip route show 2>/dev/null | sed -n 's,^default.*dev *\([^ ]*\).*$,\1,p')" if [ "$MASQ_IFACE" = "" ]; then - /sbin/route -n | grep '^0.0.0.0' | rev | cut -d' ' -f1 |rev + MASQ_IFACE="$(/sbin/route -n | grep '^0.0.0.0' | rev | cut -d' ' -f1 |rev)" if [ "$MASQ_IFACE" = "" ]; then echo "Can't autodetect default interface, guessing eth0" MASQ_IFACE="eth0" -- cgit v1.2.3