[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 [EMAIL

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 to rewrite

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 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.

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:

[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 === ---

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 later

[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 !=

[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) +++

[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

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