summaryrefslogtreecommitdiffstats
path: root/sbin/ppp-script
blob: e0caffa653d87a2c384cbffb6a2ff57131740da3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

# Set the router for this interface
/sbin/ifconfig $2 | grep "$1" | awk '{ print $4 }' > /tmp/$2_router

# Remove file if it exists
if [ -f /var/etc/nameserver_$2 ]; then 
	rm -f /var/etc/nameserver_$2
fi

# DNS1
if [ "$3" != "DNS0" ]; then 
	echo $3 >> /var/etc/nameserver_$2
fi

# DNS2
if [ "$4" != "DNS1" ]; then 
	echo $4 >> /var/etc/nameserver_$2
fi
OpenPOWER on IntegriCloud