Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find resolvconf automatically does not always work #15

Closed
usommerl opened this issue Apr 19, 2016 · 4 comments
Closed

Find resolvconf automatically does not always work #15

usommerl opened this issue Apr 19, 2016 · 4 comments

Comments

@usommerl
Copy link

The script isn't working anymore on my system. I've tracked the issue down to commit 994574f. I don't know what's the problem right now. The script works flawless if I revert commit 994574f.

$ which resolvconf
/usr/bin/resolvconf

$ pacman -Qi openvpn-update-resolv-conf-git
Name            : openvpn-update-resolv-conf-git
Version         : r24.994574f-1
Description     : OpenVPN Update resolvconf
Architecture    : any
URL             : https://github.com/masterkorp/openvpn-update-resolv-conf
Licenses        : GPL
Groups          : None
Provides        : None
Depends On      : openvpn  openresolv  bash
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 3.00 KiB
Packager        : Unknown Packager
Build Date      : Tue 19 Apr 2016 09:20:54 PM CEST
Install Date    : Tue 19 Apr 2016 09:20:59 PM CEST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : None

$ pacman -Qi openresolv
Name            : openresolv
Version         : 3.7.2-1
Description     : resolv.conf management framework (resolvconf)
Architecture    : any
URL             : http://roy.marples.name/projects/openresolv
Licenses        : custom:BSD
Groups          : None
Provides        : resolvconf
Depends On      : bash
Optional Deps   : None
Required By     : openvpn-update-resolv-conf-git
Optional For    : networkmanager  vpnc
Conflicts With  : None
Replaces        : None
Installed Size  : 48.00 KiB
Packager        : Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
Build Date      : Mon 23 Nov 2015 01:12:47 AM CET
Install Date    : Mon 14 Dec 2015 08:57:40 PM CET
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

$ bash --version
GNU bash, version 4.3.42(1)-release (x86_64-unknown-linux-gnu)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

$ uname -a
Linux nyx 4.5.1-1-ARCH #1 SMP PREEMPT Thu Apr 14 19:19:32 CEST 2016 x86_64 GNU/Linux
@usommerl
Copy link
Author

usommerl commented Apr 20, 2016

I've added a debug statement and ran the script with commit 994574f:

Apr 20 06:53:32 nyx update-resolv-conf[5271]: RESOLVCONF=

I'm using a systemd unit to activate the openvpn configuration that triggers the execution of the script

usommerl added a commit to usommerl/openvpn-update-resolv-conf that referenced this issue Apr 20, 2016
@usommerl usommerl changed the title Script does not update /etc/resolv.conf Find resolvconf automatically does not work Apr 20, 2016
@usommerl usommerl changed the title Find resolvconf automatically does not work Find resolvconf automatically does not always work Apr 20, 2016
@maleadt
Copy link

maleadt commented Apr 20, 2016

Bumped in this as well, and I assume this is because OpenVPN scrubs the environment before invoking the up or down scripts (you can verify this by adding an env command to the script). One of the missing environment variables is PATH, breaking which.

Workaround: add setenv PATH /usr/bin (or wherever your resolvconf binary is located) to your OpenVPN config.

@usommerl
Copy link
Author

@maleadt You are right. I initially thought it was systemd that scrubs the environment but that is not the case. Your solution works for me as well and I think it is better than to modify update-resolv-conf.sh itself.

@usommerl
Copy link
Author

Configuration issue. There is no reasonable way to fix this in openvpn-update-resolv-conf. You can circumvent this issue by adding the following option to your OpenVPN-Client configuration:

setenv PATH <DIRECTORY_WITH_RESOLVCONF_BINARY>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants