On Sat, 6 Feb 2021 at 14:18, Bernhard Reutner-Fischer
<rep.dot....@gmail.com> wrote:
>
> On Sat, 6 Feb 2021 11:43:31 +0000
> Walter Harms <wha...@bfs.de> wrote:
>
> > aeh, yes ...
> >
> > important question: did someone fix (and tested) this issue ?
>
> > On 1 February 2021 11:33:25 CET, Walter Harms <wha...@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

Reply via email to