Re: [OpenWrt-Devel] [PATCH] base-files/hotplug: refactoring ifup/netstate V2

2011-01-20 Thread M. Kaemmerer
I don't think, that having two base-files packages is the right way. Maintaining is too expensive, just for the same stuff. I like the idea to modularize functional expressions. There are some lines of code (specially regEx), which are definitely only readable by a professional. If this is encaps

Re: [OpenWrt-Devel] [PATCH] base-files/hotplug: refactoring ifup/netstate V2

2011-01-20 Thread Stefan Monnier
> your are right. the question is: > original: > sed -ne 's![^0-9].*$!!p' /proc/uptime > patch: > cut -d'.' -f1 /proc/uptime Both are equally fine with me. The IFS version you sent earlier falls in my "ugly code" category, OTOH. > patch-2: > uptime_in_seconds() > { > cut -d'.' -f1 /pro

Re: [OpenWrt-Devel] [PATCH] base-files/hotplug: refactoring ifup/netstate V2

2011-01-20 Thread edgar . soldin
On 20.01.2011 13:40, John Crispin wrote: >> > without having stomach ache, when base breaks. > i dont get the "when base breaks" bit he means in case the modifications (in the 'alternative' base package) introduce a show stopping bug. ..ede ___ openwrt

Re: [OpenWrt-Devel] [PATCH] base-files/hotplug: refactoring ifup/netstate V2

2011-01-20 Thread Felix Fietkau
On 2011-01-20 2:01 PM, Bastian Bittorf wrote: >> > - e.g. trying to abondon ifconfig/route/arp by using ip >> >> i doubt that owrt will ever switch to using ip, at least not in >> its >> current state. > > but it's really a pity, that a _network_ distro uses > an 25+ years old concept 8-). openwr

Re: [OpenWrt-Devel] [PATCH] base-files/hotplug: refactoring ifup/netstate V2

2011-01-20 Thread Nuno Gonçalves
On Thu, Jan 20, 2011 at 12:34, Bastian Bittorf wrote: >> But how many space is safe if busybox is compiled without sed and >> awk? > > 485.928 bytes original > 451.976 bytes without sed+awk I think this is not a strong possibility because a LOT of packages will depend on sed and awk. > - e.g. tr

Re: [OpenWrt-Devel] [PATCH] base-files/hotplug: refactoring ifup/netstate V2

2011-01-20 Thread Bastian Bittorf
> > - e.g. trying to abondon ifconfig/route/arp by using ip > > i doubt that owrt will ever switch to using ip, at least not in > its > current state. but it's really a pity, that a _network_ distro uses an 25+ years old concept 8-). openwrt can only use ip, if we change a lot in base-files... >

Re: [OpenWrt-Devel] [PATCH] base-files/hotplug: refactoring ifup/netstate V2

2011-01-20 Thread John Crispin
Hi >>> [ ] base-files standard >>> [ ] base-files mini (no sed/awk, experimental) >> >> But how many space is safe if busybox is compiled without sed and >> awk? > > 485.928 bytes original > 451.976 bytes without sed+awk that is 5k once lzma compressed it for squashfs so the size argument can b

Re: [OpenWrt-Devel] [PATCH] base-files/hotplug: refactoring ifup/netstate V2

2011-01-20 Thread Bastian Bittorf
> > [ ] base-files standard > > [ ] base-files mini (no sed/awk, experimental) > > But how many space is safe if busybox is compiled without sed and > awk? 485.928 bytes original 451.976 bytes without sed+awk but thats not only the point. if we have a selectable experimental base-files package,

Re: [OpenWrt-Devel] [PATCH] base-files/hotplug: refactoring ifup/netstate V2

2011-01-20 Thread Claudio
2011/1/20 Bastian Bittorf : > I will stop sending patches like this, because i see that > many people have stomachache with these, but i propose > for menuconfig a selection like this: > > [ ] base-files standard > [ ] base-files mini (no sed/awk, experimental) > But how many space is safe if busy

Re: [OpenWrt-Devel] [PATCH] base-files/hotplug: refactoring ifup/netstate V2

2011-01-20 Thread h2o-post
-devel-boun...@lists.openwrt.org [mailto:openwrt-devel-boun...@lists.openwrt.org] Im Auftrag von Bastian Bittorf Gesendet: Mittwoch, 19. Januar 2011 15:54 An: mailinglist Betreff: [OpenWrt-Devel] [PATCH] base-files/hotplug: refactoring ifup/netstate V2 it is always a bad idea to mix up different

Re: [OpenWrt-Devel] [PATCH] base-files/hotplug: refactoring ifup/netstate V2

2011-01-20 Thread Bastian Bittorf
> if > you, in 1, 6, 12 months, still forward port all the changes and > fixes > done in base-files to base-files-mini ?! of course i can maintain my "private" branch personally, but I really think I'am not alone. If we have it in openwrt-git, everybody can use the code. If we really recognize, t

Re: [OpenWrt-Devel] [PATCH] base-files/hotplug: refactoring ifup/netstate V2

2011-01-20 Thread John Crispin
On 20/01/11 10:06, Bastian Bittorf wrote: it is always a bad idea to mix up different languages in one environment. >> >> I don't accept this is a valid starting point. I agree that it is >> useful to limit the number of tools/languages you use, but you >> should >> still try and use the

Re: [OpenWrt-Devel] [PATCH] base-files/hotplug: refactoring ifup/netstate V2

2011-01-20 Thread Bastian Bittorf
> >> it is always a bad idea to mix up different languages > >> in one environment. > > I don't accept this is a valid starting point. I agree that it is > useful to limit the number of tools/languages you use, but you > should > still try and use the right tool/language for the right job. your

Re: [OpenWrt-Devel] [PATCH] base-files/hotplug: refactoring ifup/netstate V2

2011-01-19 Thread Stefan Monnier
>> it is always a bad idea to mix up different languages >> in one environment. I don't accept this is a valid starting point. I agree that it is useful to limit the number of tools/languages you use, but you should still try and use the right tool/language for the right job. >> now we use ash-b

Re: [OpenWrt-Devel] [PATCH] base-files/hotplug: refactoring ifup/netstate V2

2011-01-19 Thread Claudio
2011/1/19 Bastian Bittorf : >> The use of sed an awk should not be consider "a different" >> languages >> simple because aren't different languages but just tools like read > > yes, but we should use the best suiting tool, > and this means NOT that we should use > oneliners which are often unreadab

Re: [OpenWrt-Devel] [PATCH] base-files/hotplug: refactoring ifup/netstate V2

2011-01-19 Thread solca
On Wed, Jan 19, 2011 at 04:04:21PM +0100, Claudio wrote: > 2011/1/19 Bastian Bittorf : > > it is always a bad idea to mix up different languages > > in one environment. now we use ash-builtins to get > > uptime_in_seconds() instead of using cryptic sed-style. > > > > All those "restyle" to avoid t

Re: [OpenWrt-Devel] [PATCH] base-files/hotplug: refactoring ifup/netstate V2

2011-01-19 Thread Bastian Bittorf
> The use of sed an awk should not be consider "a different" > languages > simple because aren't different languages but just tools like read yes, but we should use the best suiting tool, and this means NOT that we should use oneliners which are often unreadable, when looking through code... > Mo

Re: [OpenWrt-Devel] [PATCH] base-files/hotplug: refactoring ifup/netstate V2

2011-01-19 Thread Claudio
2011/1/19 Bastian Bittorf : > it is always a bad idea to mix up different languages > in one environment. now we use ash-builtins to get > uptime_in_seconds() instead of using cryptic sed-style. > All those "restyle" to avoid the use of awk and sed are really useful? I don't believe. The use of se

[OpenWrt-Devel] [PATCH] base-files/hotplug: refactoring ifup/netstate V2

2011-01-19 Thread Bastian Bittorf
it is always a bad idea to mix up different languages in one environment. now we use ash-builtins to get uptime_in_seconds() instead of using cryptic sed-style. Signed-off-by: Bastian Bittorf >From a0997188ea3a325db33f9041297ebfea0180e31f Mon Sep 17 00:00:00 2001 From: Bastian Bittorf Date: Wed,