[PLUG] Can I make a link happen automatically?

Michael Rasmussen mikeraz at patch.com
Wed Mar 8 17:09:18 UTC 2006


John Jordan wrote:
> The chroot
> environment was not seeing the DNS server addresses in
> /etc/resolv.conf, which apparently change whenever I connect to a
> different place, e.g., going from home to PSU, back again, etc.
>
> With more help from people here I now have a little command to
> enter that links the 64-bit version to the 32-bit version of resolv.conf:
>
> sudo ln -f /etc/resolv.conf /chroot/breezy/32bits/etc/resolv.conf
>
> This works great. However, it is a pain in the neck. I need to
> automate the process somehow.

Another common element is that with each change your network interface goes down
and comes back up.

You're running Ubuntu right?  /etc/network/ifup.d (from memory, I'm at work and
there's nothing but Solaris and Windows around me) contains scripts that are
executed whenever the network interface comes up.  If you include your ln ...
command in one there the linking would happen automagically evertime the interface
came up, no matter where you were.

That thought "I need to automate the process somehow."  That's a good one.  Hold
on to it.  Great attitude to take.


-- 
   Michael Rasmussen, Portland, Ore, USA
  Be Appropriate && Follow Your Curiosity
        http://www.patch.com/words/





More information about the PLUG mailing list