Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jan 2015 18:16:22 +0530
From:      Manish Jain <>
Subject:   Running resolvconf from script
Message-ID:  <BLU436-SMTP596576432CB034C4AE3593F6470@phx.gbl>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help


I am on FreeBSD-10.1-i386. For some reason, DNS information on my system 
sometimes 'evaporates' and I am left with no network access. To restore 
internet, I have to execute the following sequentially (re0 is my 
ethernet card and /etc/nameservers.list is a file I created which 
contains the list of nameservers) :

ifconfig re0 down
ifconfig re0 up
resolvconf -d re0
resolvconf -a re0 < /etc/nameservers.list

While the sequence works well and restores internet, I would ideally 
like to move the commands into a Bash shell script. But executing the 
resolvconf commands from a script results in an error message "No 
resolv.conf for re0" (or something to that effect) and 'resolvconf -l 
re0' returns an empty/incomplete list, with no internet working yet.

So is there any way I can automate the work via a script ?

Thanks and Regards,

Manish Jain

Want to link to this message? Use this URL: <>