FreeBSD Bugzilla – Attachment 148708 Details for
Bug 194637
sysutils/vpnc-scripts overwrites /etc/resolv.conf instead of piping it to the resolvconf
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
this one phases out all resolv.conf processing, any watermarks creation and just pipes output to the resolvconf
vpnc-script.diff (text/plain), 1.67 KB, created by
Volodymyr Kostyrko
on 2014-10-27 18:02:42 UTC
(
hide
)
Description:
this one phases out all resolv.conf processing, any watermarks creation and just pipes output to the resolvconf
Filename:
MIME Type:
Creator:
Volodymyr Kostyrko
Created:
2014-10-27 18:02:42 UTC
Size:
1.67 KB
patch
obsolete
>--- /usr/local/sbin/vpnc-script 2014-08-21 15:35:46.000000000 +0300 >+++ vpnc-script 2014-10-27 19:51:36.196327068 +0200 >@@ -364,45 +364,11 @@ > # =========== resolv.conf handling for any OS ========================= > > modify_resolvconf_generic() { >- grep '^#@VPNC_GENERATED@' /etc/resolv.conf > /dev/null 2>&1 || cp -- /etc/resolv.conf "$RESOLV_CONF_BACKUP" >- NEW_RESOLVCONF="#@VPNC_GENERATED@ -- this file is generated by vpnc >-# and will be overwritten by vpnc >-# as long as the above mark is intact" >- >+ NEW_RESOLVCONF="" > # Remember the original value of CISCO_DEF_DOMAIN we need it later > CISCO_DEF_DOMAIN_ORIG="$CISCO_DEF_DOMAIN" > # Don't step on INTERNAL_IP4_DNS value, use a temporary variable > INTERNAL_IP4_DNS_TEMP="$INTERNAL_IP4_DNS" >- exec 6< "$RESOLV_CONF_BACKUP" >- while read LINE <&6 ; do >- case "$LINE" in >- nameserver*) >- if [ -n "$INTERNAL_IP4_DNS_TEMP" ]; then >- read ONE_NAMESERVER INTERNAL_IP4_DNS_TEMP <<-EOF >- $INTERNAL_IP4_DNS_TEMP >-EOF >- LINE="nameserver $ONE_NAMESERVER" >- else >- LINE="" >- fi >- ;; >- search*) >- if [ -n "$CISCO_DEF_DOMAIN" ]; then >- LINE="$LINE $CISCO_DEF_DOMAIN" >- CISCO_DEF_DOMAIN="" >- fi >- ;; >- domain*) >- if [ -n "$CISCO_DEF_DOMAIN" ]; then >- LINE="domain $CISCO_DEF_DOMAIN" >- CISCO_DEF_DOMAIN="" >- fi >- ;; >- esac >- NEW_RESOLVCONF="$NEW_RESOLVCONF >-$LINE" >- done >- exec 6<&- > > for i in $INTERNAL_IP4_DNS_TEMP ; do > NEW_RESOLVCONF="$NEW_RESOLVCONF >@@ -412,7 +378,7 @@ > NEW_RESOLVCONF="$NEW_RESOLVCONF > search $CISCO_DEF_DOMAIN" > fi >- echo "$NEW_RESOLVCONF" > /etc/resolv.conf >+ echo "$NEW_RESOLVCONF" | resolvconf "$TUNDEV" > > if [ "$OS" = "Darwin" ]; then > case "`uname -r`" in
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 194637
: 148708