simonclausen / dnscrypt-autoinstall

Automatic installation and configuration of DNSCrypt (on Debian + Redhat like systems). This script will install DNSCrypt and configure it to start on boot and use an optional dnscrypt service.
Other
224 stars 73 forks source link

Ubuntu 15.10 X64 /etc/resolv.conf issue #79

Closed SquirrelCoder closed 8 years ago

SquirrelCoder commented 8 years ago

Hi,

I have always installed this script on Debian 8 Jessie, and every time after the installation has finished I checked /etc/resolv.conf entries, and there was some warning below the screen "Permission Denied" , so I think this script makes /etc/resolv.conf file "immutable" so it doesn't get after each reboot written, BUT now I wanted to test Ubuntu 15.10 and this file isn't "immutable" , and I can edit it, so I think, that this may bring issues after the server reboots. I think it would be better, if we make this file immutable? sudo chattr +i /etc/resolv.conf UPDATE_1: So I wanted to configure the servers and these are the 2 errors:

chattr: Operation not supported while reading flags on /etc/resolv.conf
chattr: Operation not supported while reading flags on /etc/resolv.conf

so I assume you have added this command to the script but it doesn't work somehow!

AladW commented 8 years ago

stat /etc/resolv.conf

SquirrelCoder commented 8 years ago

I have ran the command you mentioned, and the first line is: File: ‘/etc/resolv.conf’ -> ‘../run/resolvconf/resolv.conf’

AladW commented 8 years ago

The problem is we're writing the local DNS address to the target of the symbolic link, but try to run chattr on the symbolic link itself, which fails.

simonclausen commented 8 years ago

Reference note: this is probably the same issue as #71, possibly #72.

AladW commented 8 years ago

Using realpath -e /etc/resolv.conf should fix this. Please test the script in the fakeroot branch and continue discussion in #64