From: Daniel Dickinson
ip from busybox is now standard and carrying both
sets of commands is undesirale, therefore move
the only consumer of ifconfig/route still in base
to using ip command.
Signed-off-by: Daniel Dickinson
---
.../netifd/files/usr/share/udhcpc/default.script | 20 +
From: Daniel Dickinson
v2: Also update previously missed deconfig use of ifconfig
: Replace ipcalc.sh callout with pure shell mask2cidr
: Remove unused local variable
ip from busybox is now standard and it would be good to
eventually drop the ancient and 10+ year deprecated
upstream commands
From: Daniel Dickinson
v3: Drop comment thanking user who gave mask2cidr at their
request
: Fix echo had correct CIDR but actual command did not
: Fix style issue
: Use full -family in ip command line instead of -f
v2: Also update previously missed deconfig use of ifconfig
: Replace
* open...@daniel.thecshore.com [20.01.2016
07:21]:
> @@ -5,30 +5,34 @@ set_classless_routes() {
> local max=128
> local type
thanks for that, i have it also on my todo-list.
please remove also the 'local type' here.
> done
> }
>
> setup_interface() {
> - echo "udhcpc:
On 20/01/16 02:10 AM, Bastian Bittorf wrote:
* open...@daniel.thecshore.com [20.01.2016
07:21]:
@@ -5,30 +5,34 @@ set_classless_routes() {
local max=128
local type
thanks for that, i have it also on my todo-list.
please remove also the 'local type' here.
Missed that.
* Daniel Dickinson [20.01.2016 10:18]:
> >>+ local prefix="$(
> >>+ eval "$(ipcalc.sh 0.0.0.0 ${subnet:-255.255.255.0})"
> >>+ echo -n $PREFIX
> >
> >dont use '-n'
>
> Why not? It prevents echo from emitting an unwanted newline.
it's not POSIX and really unneeded here (it
* Daniel Dickinson [20.01.2016 10:18]:
> >>+ local prefix="$(
> >>+ eval "$(ipcalc.sh 0.0.0.0 ${subnet:-255.255.255.0})"
> >>+ echo -n $PREFIX
> >
> >dont use '-n'
>
> Why not? It prevents echo from emitting an unwanted newline.
by the way:
is somebody fluent enough in AWK
On 20/01/16 04:24 AM, Bastian Bittorf wrote:
* Daniel Dickinson [20.01.2016 10:18]:
+ local prefix="$(
+ eval "$(ipcalc.sh 0.0.0.0 ${subnet:-255.255.255.0})"
+ echo -n $PREFIX
dont use '-n'
Why not? It prevents echo from emitting an unwanted newline.
i
On 20/01/16 04:24 AM, Bastian Bittorf wrote:
please dont double-fallback. It's ok to have it once default to '255.255.255.0',
so just use $prefix
The second fallback is in case the interpolation fails.
ok, i will not discuss this and accept.
On second thought I don't like relying on ipcalc
* open...@daniel.thecshore.com [20.01.2016
14:01]:
> +# From Bastian Bittorf
> +# Included in this file to avoid dependencies
> +mask2cidr()
please drop the comment, thank you.
> +{
> + local x=${1##*255.}
> + local allones=$(( (${#1} - ${#x}) * 2 ))
> + local tbl='0^^^128^192^224^
On 2016-01-20 19:21, open...@daniel.thecshore.com wrote:
> From: Daniel Dickinson
>
> v3: Drop comment thanking user who gave mask2cidr at their
> request
> : Fix echo had correct CIDR but actual command did not
> : Fix style issue
> : Use full -family in ip command line instead of -f
>
It worked with a /24 subnet but that might be because of defaults. I do
not currently have test bed for testing other configurations.
I plan on setting that up once I'm back from travelling.
Regards,
Daniel
On 28/01/16 05:52 PM, Felix Fietkau wrote:
On 2016-01-20 19:21, open...@daniel.thecs
On 2016-01-30 05:55, Daniel Dickinson wrote:
> It worked with a /24 subnet but that might be because of defaults. I do
> not currently have test bed for testing other configurations.
>
> I plan on setting that up once I'm back from travelling.
Please avoid top posting, it is a rather inconvenie
On 30/01/16 02:39 AM, Felix Fietkau wrote:
On 2016-01-30 05:55, Daniel Dickinson wrote:
It worked with a /24 subnet but that might be because of defaults. I do
not currently have test bed for testing other configurations.
I plan on setting that up once I'm back from travelling.
Please avoid
14 matches
Mail list logo