-
Notifications
You must be signed in to change notification settings - Fork 321
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
Skip resolvectl for now #591
Skip resolvectl for now #591
Conversation
Instead implement #590. Hopefully we will have some input from: |
On Fedora it does not work as expected when invoked as resolvconf. Also the exit status is not 0 so the test does not work actually: $ resolvconf -a -f ; echo $? Expected interface name as argument. 1 $
c12e143
to
bc6c7db
Compare
The intention actually was to catch this return value of 1. If resolvctl works as described in the man page it should support the -f option when called es resolvconf and silently ignore a missing interface. If it does not work properly, we should not use it. But maybe I have misunderstood this sentence. Maybe "missing interface" means an interface name supplied to the call, but not describing an existing interface. |
Let me detail what happens on Fedora: I may be wrong but I had understood that you were expecting the exit status of $ sudo resolvconf -a -f ; echo $?
Expected interface name as argument.
1
$
$ sudo resolvconf -d -f ; echo $?
Expected interface name as argument.
1
$ Unless I am missing something, the existing test attempts to catch an exit status of 0, not an exit status of 1, doesn't it? Finally invoking resolvectl as Running this as root on Fedora 31: $ cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 10.0.2.3
$
$ cat MY_FILE
namsserver 1.1.1.1
nameserver 1.0.0.1
$
$ cat MY_FILE | /usr/sbin/resolvconf -a enp0s3 -f ; echo $?
0
$
$ cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 10.0.2.3
$
$ cat MY_FILE | /usr/sbin/resolvconf -a enp0s3 ; echo $?
0
$
$ cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 10.0.2.3
$ |
Ah, the exit status is 0 when using a fake interface name with $ /usr/sbin/resolvconf -a foobar -f ; echo $?
0
$
$ usr/sbin/resolvconf -a foobar; echo $?
Unknown interface 'foobar': No such device
1
$ That doesn't change the fact that invoking ressolvectl as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the discussion I agree to skip the resolvectl case here. It does not work as expected and the configure test does not even catch the case that I was trying to address with it.
On Fedora resolvectl does not work as expected when invoked as
resolvconf
.Also the exit status is not 0 so the current test never works actually:
I suggest this goes in openfortivpn 1.13.2.