Re: [OpenWrt-Devel] [EMAIL PROTECTED]: [PATCH] refactoring base-files for using "ip" instead of "ifconfig/route..."]

2008-05-17 Thread Brian J. Murrell
On Sat, 2008-05-17 at 15:52 +0200, Bastian Bittorf wrote: > > Do you think so? I believe that it is better readable I've programmed I don't want to think how many thousands or tens of thousands of lines of shell script, so I think I'm pretty familiar with readability and lining up = signs doesn't

Re: [OpenWrt-Devel] [PATCH] refactoring ifconfig->ip , cleanups, /etc/preinit

2008-05-17 Thread Bastian Bittorf
* Florian Fainelli <[EMAIL PROTECTED]> [17.05.2008 18:40]: > This awk call calculates the half of the available RAM to later allow > base-files setting up a tmpfs of exactly of this size. wouldt it be better (for understanding) to do something like: - while read NUL MEM NUL; do

[OpenWrt-Devel] [PATCH] refactoring ifconfig->ip, /usr/share/udhcpc/default.script

2008-05-17 Thread Bastian Bittorf
this is a bit more, integrating fallback for ifconfig AND route...this script needs some rewrite, because it was and is ugly in some sections bye, Bastian <[EMAIL PROTECTED]> Index: package/base-files/files/usr/share/udhcpc/default.script ==

[OpenWrt-Devel] [PATCH] refactoring ifconfig->ip, fix for previous patch /etc/preinit

2008-05-17 Thread Bastian Bittorf
missspelled something. string must be "PREFIX" not only "PRE" bye, Bastian <[EMAIL PROTECTED]> Index: package/base-files/files/etc/preinit === --- package/base-files/files/etc/preinit(Revision 11157) +++ package/base-files/fi

[OpenWrt-Devel] [PATCH] refactoring ifconfig->ip, /sbin/ifdown

2008-05-17 Thread Bastian Bittorf
another base-file: Index: package/base-files/files/sbin/ifdown === --- package/base-files/files/sbin/ifdown(Revision 11157) +++ package/base-files/files/sbin/ifdown(Arbeitskopie) @@ -59,6 +59,11 @@ [ ."$device" != ."$

Re: [OpenWrt-Devel] [PATCH] refactoring ifconfig->ip , cleanups, /etc/preinit

2008-05-17 Thread Florian Fainelli
Hi Bastian, Le Saturday 17 May 2008 18:00:13 Bastian Bittorf, vous avez écrit : > first base-file which now can work with ip and ifconfig > some cleanups for better reading. can anyone explain, > what the "size"-awk thing makes really? This awk call calculates the half of the available RAM to lat

[OpenWrt-Devel] [PATCH] refactoring ifconfig->ip , cleanups, /etc/preinit

2008-05-17 Thread Bastian Bittorf
first base-file which now can work with ip and ifconfig some cleanups for better reading. can anyone explain, what the "size"-awk thing makes really? bye, Bastian <[EMAIL PROTECTED]> Index: package/base-files/files/etc/preinit === --

[OpenWrt-Devel] [PATCH] adding usage-information to ipcalc.sh

2008-05-17 Thread Bastian Bittorf
because i hate to look into source just to guess the cmdline-params... bye, Bastian Index: package/base-files/files/bin/ipcalc.sh === --- package/base-files/files/bin/ipcalc.sh (Revision 11157) +++ package/base-files/files/bin/i

Re: [OpenWrt-Devel] [EMAIL PROTECTED]: [PATCH] refactoring base-files for using "ip" instead of "ifconfig/route..."]

2008-05-17 Thread Bastian Bittorf
* Ondrej Zajicek <[EMAIL PROTECTED]> [17.05.2008 15:45]: > You can use "broadcast +" to let program compute proper broadcast address. ok, will do so... > > + ip link set dev $DEVICE arp on > > This is unnecessry, isn't it? Maybe, but it doesn hurt. See the examples at: http://www.p

Re: [OpenWrt-Devel] [EMAIL PROTECTED]: [PATCH] refactoring base-files for using "ip" instead of "ifconfig/route..."]

2008-05-17 Thread Bastian Bittorf
* Peter Denison <[EMAIL PROTECTED]> [17.05.2008 15:00]: > I would far rather see 'ip' tried first, and then fall back to ifconfig > (which is almost guaranteed to be present) than the other way round. Ofcourse this is my goal, but let it us do slow and safe I think... bye, Bastian. signature

Re: [OpenWrt-Devel] [EMAIL PROTECTED]: [PATCH] refactoring base-files for using "ip" instead of "ifconfig/route..."]

2008-05-17 Thread Bastian Bittorf
* Brian J. Murrell <[EMAIL PROTECTED]> [17.05.2008 15:45]: > > + local BROADCAST="192.168.1.255" # maybe calculate from > > IP/NETMASK? > > + local NETMASK="255.255.255.0" > > + local CIDR_MASK="24"# which must be NETMASK in > > other notation (maybe calculate

Re: [OpenWrt-Devel] [EMAIL PROTECTED]: [PATCH] refactoring base-files for using "ip" instead of "ifconfig/route..."]

2008-05-17 Thread Brian J. Murrell
On Sat, 2008-05-17 at 14:32 +0200, Bastian Bittorf wrote: > hello hackers, > > here are some patches to let the user decide > wether to use "ifconfig/route..." or the nice > command "ip", which is much more cleaner IMHO. Cool. > This is not complete yet, but let me first know, if > the used fall

Re: [OpenWrt-Devel] [EMAIL PROTECTED]: [PATCH] refactoring base-files for using "ip" instead of "ifconfig/route..."]

2008-05-17 Thread Peter Denison
On Sat, 17 May 2008, Bastian Bittorf wrote: > here are some patches to let the user decide > wether to use "ifconfig/route..." or the nice > command "ip", which is much more cleaner IMHO. > > This is not complete yet, but let me first know, if > the used fallback-method or "elegant" or if I have >

Re: [OpenWrt-Devel] [EMAIL PROTECTED]: [PATCH] refactoring base-files for using "ip" instead of "ifconfig/route..."]

2008-05-17 Thread Ondrej Zajicek
On Sat, May 17, 2008 at 02:32:25PM +0200, Bastian Bittorf wrote: > + ip addr add dev $DEVICE $IP/$CIDR_MASK broadcast $BROADCAST You can use "broadcast +" to let program compute proper broadcast address. > + ip link set dev $DEVICE arp on This is unnecessry, isn't it?

[OpenWrt-Devel] [EMAIL PROTECTED]: [PATCH] refactoring base-files for using "ip" instead of "ifconfig/route..."]

2008-05-17 Thread Bastian Bittorf
hello hackers, here are some patches to let the user decide wether to use "ifconfig/route..." or the nice command "ip", which is much more cleaner IMHO. This is not complete yet, but let me first know, if the used fallback-method or "elegant" or if I have to rewrite the code. Bastian Bittorf <[E