summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorgnhb <gnoahb@gmail.com>2010-03-28 22:04:13 +0700
committergnhb <gnoahb@gmail.com>2010-03-28 22:04:13 +0700
commit5ca41f8b4f70dbe45d14c74349657a60f0b6bbde (patch)
tree2bcec89132f811444d6e7236b04dfc780f5a47c3 /usr
parent158b5cc3fb62a52c7cd3ffc1c0d96db368a9c403 (diff)
downloadpfsense-5ca41f8b4f70dbe45d14c74349657a60f0b6bbde.zip
pfsense-5ca41f8b4f70dbe45d14c74349657a60f0b6bbde.tar.gz
Don't need the rm -f statement when using > redirect to overwrite the
file, and add the "then" to the if statements
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/sbin/ppp-linkup6
1 files changed, 2 insertions, 4 deletions
diff --git a/usr/local/sbin/ppp-linkup b/usr/local/sbin/ppp-linkup
index a17b3d8..f15f082 100755
--- a/usr/local/sbin/ppp-linkup
+++ b/usr/local/sbin/ppp-linkup
@@ -1,7 +1,5 @@
#!/bin/sh
-/bin/rm -f /var/etc/nameserver_$1
-
# unset CGI environment variables so as not to confuse PHP
unset CONTENT_TYPE GATEWAY_INTERFACE REMOTE_USER REMOTE_ADDR AUTH_TYPE
unset HTTP_USER_AGENT CONTENT_LENGTH SCRIPT_FILENAME HTTP_HOST
@@ -9,12 +7,12 @@ unset SERVER_SOFTWARE HTTP_REFERER SERVER_PROTOCOL REQUEST_METHOD
unset SERVER_PORT SCRIPT_NAME SERVER_NAME
# write nameservers to file
-if [ "$6" = "dns1" ]
+if [ $6 = "dns1" ]; then
echo $7 > /var/etc/nameserver_$1
/sbin/route add $7 $4
fi
-if [ "$8" = "dns2" ]
+if [ $8 = "dns2" ]; then
echo $9 >> /var/etc/nameserver_$1
/sbin/route add $9 $4
fi
OpenPOWER on IntegriCloud