Re: [OpenWrt-Devel] opkg remove ifconfig opkg install 'ip'

2009-06-19 Thread Bastian Bittorf
* Jo-Philipp Wich x...@subsignal.org [18.06.2009 16:30]:
 
 In any case we should keep the stuff compatible with ifconfig/route.

for the first time: yes

but on the long run we should definitely kick
the oldskool-stuff, which is pretty awkward IMHO.
(but show a short hint, if somebody types 'ifconfig/router/arp')

bye, Bastian Bittorf
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] opkg remove ifconfig opkg install 'ip'

2009-06-19 Thread Malte S. Stretz
On Friday 19 June 2009 09:31:59 Bastian Bittorf wrote:
 * Vasilis Tsiligiannis b_tsiligian...@silverton.gr [18.06.2009 21:15]:
  Try removing 'route' too (-ifconfig-route+ip). 'route' can be replaced by
  'ip' also, if this function is implemented in busybox.

 -ifconfig -route -arp
 +ip

arp is already a oneliner in /etc/profile and not compiled into busybox per 
default.

busybox+ip-ipconfig-route:
-rwxr-xr-x 1 mss mss 543796 2009-06-19 09:46 busybox
-rwxr-xr-x 1 mss mss 632750 2009-06-19 09:46 busybox_unstripped

That's only 12k more than busybox-ip+ipconfig+route.  I still don't know if 
busybox' ip can do everything the real one can do.  Somebody should test all 
packages depending on the ip package to see if they work with the busybox 
variant.

I agree that ip is the nicer command, so the ipconfig/route wrapper could go 
into an own package on which unported packages have to depend and the default 
image could just have another oneliner in /etc/profile a la arp.

Cheers,
Malte

-- 
   
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] opkg remove ifconfig opkg install 'ip'

2009-06-19 Thread Bastian Bittorf
* Malte S. Stretz m...@apache.org [19.06.2009 11:00]:
 
 arp is already a oneliner in /etc/profile and not compiled into busybox per 
 default.

this has nothing to do with the real arp command,
its just an quick and dirty show the arp table, but
you cannot manipulate anything using /proc/net/arp.

 I agree that ip is the nicer command, so the ipconfig/route wrapper could go 
 into an own package on which unported packages have to depend and the default 

i think it should be integrated into the core-system, as long
it is used so much. the wrapper_scripts are ATM about 10K, but
are only sourced if needed...

bye, Bastian Bittorf
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] opkg remove ifconfig opkg install 'ip'

2009-06-19 Thread elektra
Hi!

 Try removing 'route' too (-ifconfig-route+ip). 'route' can be replaced by 
 'ip' 
 also, if this function is implemented in busybox.

You are right. However I did that a few months ago and ran into problems
with Asterisk. For some strange reason it depends on it. Asterisk
doesn't connect to other Asterisk servers if 'route' is missing.

Cheers,
Elektra

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] opkg remove ifconfig opkg install 'ip'

2009-06-19 Thread Bastian Bittorf
* elektra onelek...@gmx.net [19.06.2009 12:15]:
 
 doesn't connect to other Asterisk servers if 'route' is missing.

therefore i implement a route() wrapper.
ATM i start at /etc/functions.sh but e.g.
asterisk does not use it. maybe it is a good
idea to make a symlink for /sbin/route|ifconfig|arp
to to wrapper at boottime, to avoid such things?

other ideas?

bye, Bastian Bittorf

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] opkg remove ifconfig opkg install 'ip'

2009-06-19 Thread Bastian Bittorf
* Outback Dingo outbackdi...@gmail.com [18.06.2009 16:00]:
 i have some pretty unique environments here, want to send me the patch i can
 help with some testing

not a clean patch, but easy to install:

ssh r...@openwrtbox
cd /etc
wget -O - http://intercity-vpn.de/files/functions.sh_addon; functions.sh
wget http://intercity-vpn.de/files/ip2ifconfig_wrapper.sh
wget http://intercity-vpn.de/files/ip2ifconfig_wrapper_function_netmask_to_cidr

change the permissions to 'executable', be sure to have 'ip' installed
and reboot your box with serial console attached 8-) and send me the log
in /www/ifconfigwrapper_log.txt

bye, Bastian Bittorf


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] opkg remove ifconfig opkg install 'ip'

2009-06-19 Thread Bastian Bittorf
* Malte S. Stretz m...@apache.org [19.06.2009 13:15]:
 
 Maybe its just me, but the last few weeks I tried to grok the OpenWrt base-
 files scrips (and succeeded [1]) and my impression is that there is already a 
 lot of stuff crammed into /etc/functions.sh which is sourced by almost 
 everything but only used by a handful of scripts.

a totally agree. for the firmware in our city-mesh we also
run into that problem. now we have splittet the 500K+scripts 
into 'moduls' [1] and source only those, when need like this:


#!/bin/sh /bin/needs

_needs log wifi sanitizer   # source parts we need

_sanitizer $(uci get wireless.$WIFIDEV.bssid) mac hex lowercase check || {
func_log check_bssid daemon debug not wellformed
}



only the functions 'needs()' has to know the path/filename of scripts
just for playing with the sanitizer:

http://www.datenkiste.org/cgi-bin/gitweb.cgi?p=fff/.git;a=blob_plain;f=etc/kalua/sanitizer;hb=75e2a2ce08980833e14591f0086c8438a3e8367b


bye, Bastian Bittorf

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] opkg remove ifconfig opkg install 'ip'

2009-06-18 Thread Outback Dingo
i have some pretty unique environments here, want to send me the patch i can
help with some testing


On Thu, Jun 18, 2009 at 9:40 AM, Bastian Bittorf bitt...@bluebottle.comwrote:

 today I've written a proof-of-concept for
 getting rid of oldstyle networking aka 'ifconfig'.

 The approach is to to have an function ifconfig()
 in /etc/functions.sh, which is included in all
 startup-scripts anyway, and if there is an /usr/sbin/ip,
 translate old_style to new_style...

 Next steps, before delivering a patch, is to test
 some 'complex' setups and cleanup the code and also
 translate 'route' to 'ip route' and 'arp' to 'ip neigh'.

 bye, Bastian Bittorf

 this is the bootlog of on r16356 without 'ifconfig':

 up12s '/sbin/hotplug-call' calls 'ifconfig lo' -
 '/etc/ip2ifconfig_wrapper.sh lo' (show_specific_dev)
 up13s '/sbin/hotplug-call' calls 'ifconfig lo 0.0.0.0' - 'ip address add
 0.0.0.0 dev lo'
 up13s '/sbin/hotplug-call' calls 'ifconfig lo' -
 '/etc/ip2ifconfig_wrapper.sh lo' (show_specific_dev)
 up13s '/sbin/hotplug-call' calls 'ifconfig lo up' - 'ip link set dev lo
 up'
 up14s '/sbin/hotplug-call' calls 'ifconfig lo 127.0.0.1 netmask 255.0.0.0
 broadcast +' - 'ip address add 127.0.0.1/8 broadcast + dev lo'
 up14s '/sbin/hotplug-call' calls 'ifconfig' -
 '/etc/ip2ifconfig_wrapper.sh' (show_all_devs)
 up16s '/sbin/hotplug-call' calls 'ifconfig eth0.0' - error (not in
 /proc/net/dev)
 up16s '/sbin/hotplug-call' calls 'ifconfig eth0 up' - 'ip link set dev
 eth0 up'
 up16s '/sbin/hotplug-call' calls 'ifconfig eth0.1' - error (not in
 /proc/net/dev)
 up16s '/sbin/hotplug-call' calls 'ifconfig eth0 up' - 'ip link set dev
 eth0 up'
 up17s '/sbin/hotplug-call' calls 'ifconfig eth0.0' -
 '/etc/ip2ifconfig_wrapper.sh eth0.0' (show_specific_dev)
 up18s '/sbin/hotplug-call' calls 'ifconfig eth0.0 0.0.0.0' - 'ip address
 add 0.0.0.0 dev eth0.0'
 up18s '/sbin/hotplug-call' calls 'ifconfig eth0.0' -
 '/etc/ip2ifconfig_wrapper.sh eth0.0' (show_specific_dev)
 up19s '/sbin/hotplug-call' calls 'ifconfig eth0.0' -
 '/etc/ip2ifconfig_wrapper.sh eth0.0' (show_specific_dev)
 up20s '/sbin/hotplug-call' calls 'ifconfig br-lan' - error (not in
 /proc/net/dev)
 up20s '/sbin/hotplug-call' calls 'ifconfig br-lan up' - 'ip link set dev
 br-lan up'
 up20s '/sbin/hotplug-call' calls 'ifconfig eth0.0 up' - 'ip link set dev
 eth0.0 up'
 up21s '/sbin/hotplug-call' calls 'ifconfig eth0.1' -
 '/etc/ip2ifconfig_wrapper.sh eth0.1' (show_specific_dev)
 up22s '/sbin/hotplug-call' calls 'ifconfig eth0.1 0.0.0.0' - 'ip address
 add 0.0.0.0 dev eth0.1'
 up22s '/sbin/hotplug-call' calls 'ifconfig eth0.1' -
 '/etc/ip2ifconfig_wrapper.sh eth0.1' (show_specific_dev)
 up23s '/sbin/hotplug-call' calls 'ifconfig eth0.1' -
 '/etc/ip2ifconfig_wrapper.sh eth0.1' (show_specific_dev)
 up24s '/sbin/hotplug-call' calls 'ifconfig eth0.1 up' - 'ip link set dev
 eth0.1 up'
 up25s '/sbin/hotplug-call' calls 'ifconfig' -
 '/etc/ip2ifconfig_wrapper.sh' (show_all_devs)
 up26s '/usr/share/udhcpc/default.script' calls 'ifconfig eth0.1 0.0.0.0' -
 'ip address add 0.0.0.0 dev eth0.1'
 up31s '/sbin/hotplug-call' calls 'ifconfig br-lan up' - 'ip link set dev
 br-lan up'
 up31s '/sbin/wifi' calls 'ifconfig' - '/etc/ip2ifconfig_wrapper.sh'
 (show_all_devs)
 up32s '/sbin/hotplug-call' calls 'ifconfig br-lan up' - 'ip link set dev
 br-lan up'
 up32s '/sbin/hotplug-call' calls 'ifconfig br-lan 192.168.1.28 netmask
 255.255.255.0 broadcast +' - 'ip address add 192.168.1.28/24 broadcast +
 dev br-lan'
 up33s '/sbin/hotplug-call' calls 'ifconfig' -
 '/etc/ip2ifconfig_wrapper.sh' (show_all_devs)
 up37s '/sbin/wifi' calls 'ifconfig wlan0 up' - 'ip link set dev wlan0 up'
 up39s '/sbin/wifi' calls 'ifconfig wlan0' - '/etc/ip2ifconfig_wrapper.sh
 wlan0' (show_specific_dev)
 up39s '/sbin/wifi' calls 'ifconfig wlan0 0.0.0.0' - 'ip address add
 0.0.0.0 dev wlan0'
 up40s '/sbin/wifi' calls 'ifconfig wlan0' - '/etc/ip2ifconfig_wrapper.sh
 wlan0' (show_specific_dev)
 up40s '/sbin/wifi' calls 'ifconfig br-lan' - '/etc/ip2ifconfig_wrapper.sh
 br-lan' (show_specific_dev)
 up41s '/sbin/wifi' calls 'ifconfig wlan0 up' - 'ip link set dev wlan0 up'


 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] opkg remove ifconfig opkg install 'ip'

2009-06-18 Thread Jo-Philipp Wich
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi.

 today I've written a proof-of-concept for
 getting rid of oldstyle networking aka 'ifconfig'.

You do realize that this oldstyle networking stuff uses busybox
internals while switching to ip will introduce yet another few
kilobytes of bloat?

In any case we should keep the stuff compatible with ifconfig/route.


~ JoW
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAko6Tb4ACgkQdputYINPTPOVXwCgkKSYPBAR4/KAGyCkEFLD+yKy
ETUAmwWrNn6k5SpkbjmMsBf3jPmyWDep
=DFG3
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] opkg remove ifconfig opkg install 'ip'

2009-06-18 Thread Malte S. Stretz
On Thursday 18 June 2009 16:22:54 Jo-Philipp Wich wrote:
  today I've written a proof-of-concept for
  getting rid of oldstyle networking aka 'ifconfig'.

 You do realize that this oldstyle networking stuff uses busybox
 internals while switching to ip will introduce yet another few
 kilobytes of bloat?

busybox also has a builtin ip; I don't know if it has all the features needed 
but if it has, the images could get even smaller without the external ip and 
without the builtin ifconfig.

Cheers,
Malte

-- 
   
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] opkg remove ifconfig opkg install 'ip'

2009-06-18 Thread Ferenc Wagner
Malte S. Stretz m...@apache.org writes:

 On Thursday 18 June 2009 16:22:54 Jo-Philipp Wich wrote:
 today I've written a proof-of-concept for
 getting rid of oldstyle networking aka 'ifconfig'.

 You do realize that this oldstyle networking stuff uses busybox
 internals while switching to ip will introduce yet another few
 kilobytes of bloat?

 busybox also has a builtin ip; I don't know if it has all the features needed 
 but if it has, the images could get even smaller without the external ip and 
 without the builtin ifconfig.

The ip applet is not enabled currently, and I don't know if it's
smaller than the ifconfig applet.
-- 
Feri.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] opkg remove ifconfig opkg install 'ip'

2009-06-18 Thread Vasilis Tsiligiannis
On Thursday 18 June 2009 20:27:04 Malte S. Stretz wrote:
 Now I did :)

 busybox+ifconfig-ip:
 -rwxr-xr-x 1 mss mss 531500 2009-06-18 18:57 busybox
 -rwxr-xr-x 1 mss mss 618905 2009-06-18 18:57 busybox_unstripped

 busybox-ifconfig+ip:
 -rwxr-xr-x 1 mss mss 551168 2009-06-18 19:17 busybox
 -rwxr-xr-x 1 mss mss 640684 2009-06-18 19:17 busybox_unstripped

 Yes, it seems like the ip applet is definitely bigger.

Hello,

Try removing 'route' too (-ifconfig-route+ip). 'route' can be replaced by 'ip' 
also, if this function is implemented in busybox.

 Cheers,
 Malte

Regards,
Vasilis

-- 
Vasilis Tsiligiannis
Silverton Electronics

Dep.Research  Development
Tel.+302105746996
Fax.+302105745389
Email.  b_tsiligian...@silverton.gr
URL.http://www.silverton.gr/
Addr.   30, Anatolis str.
Athens, Peristeri, 12133
GREECE


signature.asc
Description: This is a digitally signed message part.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] opkg remove ifconfig opkg install 'ip'

2009-06-18 Thread Ferenc Wagner
Malte S. Stretz m...@apache.org writes:

 On Thursday 18 June 2009 18:20:06 Ferenc Wagner wrote:
 Malte S. Stretz m...@apache.org writes:
 On Thursday 18 June 2009 16:22:54 Jo-Philipp Wich wrote:
 today I've written a proof-of-concept for
 getting rid of oldstyle networking aka 'ifconfig'.

 You do realize that this oldstyle networking stuff uses busybox
 internals while switching to ip will introduce yet another few
 kilobytes of bloat?

 busybox also has a builtin ip; I don't know if it has all the features
 needed but if it has, the images could get even smaller without the
 external ip and without the builtin ifconfig.

 The ip applet is not enabled currently, and I don't know if it's
 smaller than the ifconfig applet.

 I know that its not enabled per default and don't know either if it is 
 smaller 
 (but I'm currently compiling to see what the difference is).  But even if it 
 is the same size as ifconfig, the per default installed ip package (the 
 binary 
 has about 200k) would become obsolete.  If busybox can do all the stuff it 
 does that means.

 So maybe $((script + (busybox + ip_applet - ifconfig_applet)))  $((ip + 
 (busybox - ip_applet + ifconfig_applet))...  we'll see.

Along the same lines, do you think the external bridge-tools is worth
staying installed by default, given that the busybox brctl applet is
already included?  I didn't notice any missing functionality until
now.  If not error messages...
-- 
Cheers,
Feri.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel