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.orig (-2 / +35 lines)
Lines 211-217 Link Here
211
	}
211
	}
212
fi
212
fi
213
213
214
write_resolvconf() {
214
write_resolvconf_file() {
215
	grep '^#@VPNC_GENERATED@' /etc/resolv.conf > /dev/null 2>&1 || cp -- /etc/resolv.conf "$RESOLV_CONF_BACKUP"
215
	grep '^#@VPNC_GENERATED@' /etc/resolv.conf > /dev/null 2>&1 || cp -- /etc/resolv.conf "$RESOLV_CONF_BACKUP"
216
	NEW_RESOLVCONF="#@VPNC_GENERATED@ -- this file is generated by vpnc
216
	NEW_RESOLVCONF="#@VPNC_GENERATED@ -- this file is generated by vpnc
217
# and will be overwritten by vpnc
217
# and will be overwritten by vpnc
Lines 305-311 Link Here
305
	fi
305
	fi
306
}
306
}
307
307
308
reset_resolvconf() {
308
write_resolvconf_manager() {
309
	NEW_RESOLVCONF=""
310
	for i in $INTERNAL_IP4_DNS; do
311
		NEW_RESOLVCONF="$NEW_RESOLVCONF
312
nameserver $i"
313
	done
314
	if [ -n "$CISCO_DEF_DOMAIN" ]; then
315
		NEW_RESOLVCONF="$NEW_RESOLVCONF
316
search $CISCO_DEF_DOMAIN"
317
	fi
318
	echo "$NEW_RESOLVCONF" | /sbin/resolvconf -a $TUNDEV
319
}
320
321
write_resolvconf() {
322
	if [ -x /sbin/resolvconf ]; then
323
		write_resolvconf_manager $@
324
	else
325
		write_resolvconf_file $@
326
	fi
327
}
328
329
reset_resolvconf_file() {
309
	if [ ! -e "$RESOLV_CONF_BACKUP" ]; then
330
	if [ ! -e "$RESOLV_CONF_BACKUP" ]; then
310
		return
331
		return
311
	fi
332
	fi
Lines 330-335 Link Here
330
	fi
351
	fi
331
}
352
}
332
353
354
reset_resolvconf_manager() {
355
	/sbin/resolvconf -d $TUNDEV
356
}
357
358
reset_resolvconf() {
359
	if [ -x /sbin/resolvconf ]; then
360
		reset_resolvconf_manager $@
361
	else
362
		reset_resolvconf_file $@
363
	fi
364
}
365
333
do_connect() {
366
do_connect() {
334
	if [ -n "$CISCO_BANNER" ]; then
367
	if [ -n "$CISCO_BANNER" ]; then
335
		echo "Connect Banner:"
368
		echo "Connect Banner:"

Return to bug 171697