Bastian Bittorf wrote: > After discussing some style- and method-related things, > now the hole bunch of basefiles that are affected: > > ./package/base-files/files/etc/hotplug.d/iface/10-routes > ./package/base-files/files/etc/preinit > ./package/base-files/files/lib/network/config.sh > ./package/base-files/files/sbin/ifdown > ./package/base-files/files/usr/share/udhcpc/default.script > > (i've just grep'ed all basefiles for "ifconfig " and "route ") The problem with this approach is that it relies only on the return type of the ifconfig/route calls. I'd suggest the following approach: In a central include file, check for presence of the ip applet or executable and if it is not present, define a function ip(), which calls ifconfig and route. The advantage to this would be that we can convert all our scripts to the new format without having to add checks everywhere, and when we want to switch completely, it's simply a matter of removing the legacy code. What do you think?
- Felix _______________________________________________ openwrt-devel mailing list [email protected] http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
