Skip to content

resolvconf -u fails with "command not found" when using local nameservers (127.0.0.1, ::1) #40

@ih8d8

Description

@ih8d8

Environment

  • openresolv version: 3.17.2
  • OS: Arch Linux
  • Shell: bash

Description

When using local nameservers like 127.0.0.1 or ::1 in a resolvconf configuration file, running resolvconf -u fails with an error attempting to execute the IP address as a command.

Steps to Reproduce

  1. Create a resolvconf configuration with local nameservers (I use this for DNSCrypt-Proxy):

    echo -e "nameserver ::1\nnameserver 127.0.0.1\noptions edns0 single-request-reopen" | sudo resolvconf -a dnscrypt
  2. Verify the file was created:

    cat /var/run/resolvconf/keys/dnscrypt

    Output:

    nameserver ::1
    nameserver 127.0.0.1
    options edns0 single-request-reopen
    
  3. Run the update command:

    sudo resolvconf -u

Expected Behavior

The command should successfully merge all resolvconf configurations and update /etc/resolv.conf with the nameservers.

Actual Behavior

The command fails with the following error:

/usr/bin/resolvconf: line 999: 127.0.0.1: command not found

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions