mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Don't need the rm -f statement when using > redirect to overwrite the
file, and add the "then" to the if statements
This commit is contained in:
parent
158b5cc3fb
commit
5ca41f8b4f
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user