[elbe-users] replacing /etc/resolv.conf with a symlink

Olivier Dion dion at linutronix.de
Tue Nov 19 20:48:54 CET 2019


On 2019-11-19T06:07:42-0500, Ralf Schlatterbeck <rsc at runtux.com> 
wrote:

> On Tue, Nov 19, 2019 at 11:13:08AM +0100, Ralf Schlatterbeck 
> wrote:
> > I have a system that manages /etc/resolv.conf in a nonstandard 
> > way.
> > I'm trying to replace /etc/resolv.conf with a symlink to a 
> > directory
> > mounted later (in a NOR flash not the standard rootfs which is 
> > on NAND
> > flash) In the latest version of ELBE (12.2+deb9+build811) I'm 
> > unable to
> > do this.
> >
> > - I have a debian package "iptna" that contains 
> > /etc/resolv.conf as a
> >   symlink
> > - I have a finetuning rule (that I find nowhere in the log):
> >   <command>ln -sf /ipCAT.runtime/etc/resolv.conf 
> >   /etc</command>
> > - Both should create the symlink but don't
> >
> > But resolv.conf ends up as a file containing just the line:
> >
> > nameserver 10.0.2.3

> I've found a workaround, if I put the symlink into the archive 
> attached
> to the elbe XML file, the symlink is correctly created. But why 
> don't
> all the other methods work for resolv.conf?

Don't use the <command> action but the <ln> action instead.

The reason why this is important is because the <ln> action will 
protect the created symlink from being reverted to the original. 
The <command> action does not.

Let me know if that work for you.

--
Olivier Dion



More information about the elbe-users mailing list