[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: Question on udhcpc script
From:       Bernhard Reutner-Fischer <rep.dot.nop () gmail ! com>
Date:       2021-02-06 14:04:45
Message-ID: CAC1BbcRBAFtEh8w6Fx9t9F6UDt4S8qDRY77pX9zAoxx76F5OYw () mail ! gmail ! com
[Download RAW message or body]

On Sat, 6 Feb 2021 at 14:18, Bernhard Reutner-Fischer
<rep.dot.nop@gmail.com> wrote:
>
> On Sat, 6 Feb 2021 11:43:31 +0000
> Walter Harms <wharms@bfs.de> wrote:
>
> > aeh, yes ...
> >
> > important question: did someone fix (and tested) this issue ?
>
> > On 1 February 2021 11:33:25 CET, Walter Harms <wharms@bfs.de> wrote:
> > >hello,
> > >indeed that looks wrong:
> > >it would be easy to invert but i have no setup to test.
> > >can you do that ?
> > >
> > >just change:
> > >  if [ -z "$(ip -6 route list | grep default)" ]; then
> > >into
> > >if ! [ -z "$(ip -6 route list | grep default)" ]; then
> > >
> > >(note the ! here)
> >
> > Translates to -n
>
> Well, first i cannot find that script in the busybox tree.
> Second, i suppose this should read ip -6 route list default
> Third it seems to come from buildroot and current buildroot has it
> fixed already, so maybe just update.

PS: and as a saturday afternoon quiz let's think about why "we" should use
$ ip route list default
instead of
$ ip route list | grep default
to determine if we in fact have a default route configured.

...
Exactly right! *clap* *clap* :)

ip link add mydefaultdummy type dummy
ip a add 172.16.1.1 dev mydefaultdummy
ip link set mydefaultdummy up
ip r add 172.20.1.1 via 172.16.1.1 dev mydefaultdummy

i.e. we can have anything _named_ "*default*" in the routing table,
for example our nfsroot might be in that private net.
But that does not mean this route _is_ in fact the default route this
helper function supposedly waits for.
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic