Project

General

Profile

« Previous | Next » 

Revision fe85513f

Added by Renato Botelho about 11 years ago

Fix awk syntax, it fixes #3813

View differences:

usr/local/sbin/ppp-linkup
18 18
	if [ ${ALLOWOVERRIDE} -gt 0 ]; then
19 19
		# write nameservers to file
20 20
		if [ "`echo ${6}|grep -c dns1`" -gt 0 ]; then
21
			DNS1=`echo ${6} |awk '{print ${2}}'`
21
			DNS1=`echo ${6} |awk '{print $2}'`
22 22
			echo "${DNS1}"> /var/etc/nameserver_${1}
23 23
			/sbin/route change "${DNS1}" ${4}
24 24
		fi
25 25
		if [ "`echo ${7}|grep -c dns2`" -gt 0 ]; then
26
			DNS2=`echo ${7} |awk '{print ${2}}'`
26
			DNS2=`echo ${7} |awk '{print $2}'`
27 27
			echo "${DNS2}" >> /var/etc/nameserver_${1}
28 28
			/sbin/route change "${DNS2}" ${4}
29 29
		fi
......
43 43
	if [ ${ALLOWOVERRIDE} -gt 0 ]; then
44 44
		# write nameservers to file
45 45
		if [ "`echo ${6}|grep -c dns1`" -gt 0 ]; then
46
			DNS1=`echo ${6} |awk '{print ${2}}'`
46
			DNS1=`echo ${6} |awk '{print $2}'`
47 47
			echo "${DNS1}"> /var/etc/nameserver_v6${1}
48 48
			/sbin/route change -inet6 "${DNS1}" ${4}
49 49
		fi
50 50
		if [ "`echo ${7}|grep -c dns2`" -gt 0 ]; then
51
			DNS2=`echo ${7} |awk '{print ${2}}'`
51
			DNS2=`echo ${7} |awk '{print $2}'`
52 52
			echo "${DNS2}" >> /var/etc/nameserver_v6${1}
53 53
			/sbin/route change -inet6 "${DNS2}" ${4}
54 54
		fi

Also available in: Unified diff