Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 171697 | Differences between
and this patch

Collapse All | Expand All

(-)vpnc-script (-2 / +35 lines)
Lines 221-227 Link Here
221
	}
221
	}
222
fi
222
fi
223
223
224
write_resolvconf() {
224
write_resolvconf_file() {
225
	grep '^#@VPNC_GENERATED@' /etc/resolv.conf > /dev/null 2>&1 || cp -- /etc/resolv.conf "$RESOLV_CONF_BACKUP"
225
	grep '^#@VPNC_GENERATED@' /etc/resolv.conf > /dev/null 2>&1 || cp -- /etc/resolv.conf "$RESOLV_CONF_BACKUP"
226
	NEW_RESOLVCONF="#@VPNC_GENERATED@ -- this file is generated by vpnc
226
	NEW_RESOLVCONF="#@VPNC_GENERATED@ -- this file is generated by vpnc
227
# and will be overwritten by vpnc
227
# and will be overwritten by vpnc
Lines 319-325 Link Here
319
	fi
319
	fi
320
}
320
}
321
321
322
reset_resolvconf() {
322
write_resolvconf_manager() {
323
	NEW_RESOLVCONF=""
324
	for i in $INTERNAL_IP4_DNS; do
325
		NEW_RESOLVCONF="$NEW_RESOLVCONF
326
nameserver $i"
327
	done
328
	if [ -n "$CISCO_DEF_DOMAIN" ]; then
329
		NEW_RESOLVCONF="$NEW_RESOLVCONF
330
domain $CISCO_DEF_DOMAIN"
331
	fi
332
	echo "$NEW_RESOLVCONF" | /sbin/resolvconf -a $TUNDEV
333
}
334
335
write_resolvconf() {
336
	if [ -x /sbin/resolvconf ]; then
337
		write_resolvconf_manager $@
338
	else
339
		write_resolvconf_file $@
340
	fi
341
}
342
343
reset_resolvconf_file() {
323
	if [ ! -e "$RESOLV_CONF_BACKUP" ]; then
344
	if [ ! -e "$RESOLV_CONF_BACKUP" ]; then
324
		return
345
		return
325
	fi
346
	fi
Lines 344-349 Link Here
344
	fi
365
	fi
345
}
366
}
346
367
368
reset_resolvconf_manager() {
369
	/sbin/resolvconf -d $TUNDEV
370
}
371
372
reset_resolvconf() {
373
	if [ -x /sbin/resolvconf ]; then
374
		reset_resolvconf_manager $@
375
	else
376
		reset_resolvconf_file $@
377
	fi
378
}
379
347
do_connect() {
380
do_connect() {
348
	if [ -n "$CISCO_BANNER" ]; then
381
	if [ -n "$CISCO_BANNER" ]; then
349
		echo "Connect Banner:"
382
		echo "Connect Banner:"

Return to bug 171697