Skip to contentSkip to conversation

ipkg install batman over ssh: postinst fails

B.A.T.M.A.N. [email protected] 4 participants 13 messages Nov 16, 2008 – Nov 17, 2008

lore
Share & tools
lore
#0 lore raw

Hi

I have a mesh running freifunk â’ˆ.6.32 nodes.
I am using the recommended batman0.2 ipkg to test it next to OLSR. (Is there no ipkg package and source for 0.3 or the latest stable?)

When I did two nodes manually, I installed and set the network migration, and saw some batman packets.

Then I went ahead and scripted an install on all the nodes (about 40).

It goes, with dropbear authorized_keys, for each node in $NEWIP:

   # batman sources
   scp root@${NEWIP}:/etc/ipkg.conf .
   patch ipkg.conf < ipkg.conf.patch
   scp ipkg.conf root@${NEWIP}:/etc/ipkg.conf
   # update
   ssh root@${NEWIP} ipkg update
   #########################
   ## Admin > B.A.T.M.A.N ##
   #########################
   # Setup screen for migration of network (only shown once)
   /usr/sbin/nvram set ff_bat_netmig=172.18/172.16
   # B.A.T.M.A.N. on/off
   /usr/sbin/nvram set ff_bat_start=1
   # WLAN as eth1:bat on subnet/16
   /usr/sbin/nvram set ff_bat_ran_on=1
   /usr/sbin/nvram set ff_bat_ran_if=eth1:bat
   /usr/sbin/nvram set ff_bat_ran_ip=172.16.174.97
   /usr/sbin/nvram set ff_bat_ran_pf=16
   # LAN as br0 on subnet/29
   /usr/sbin/nvram set ff_bat_lan_on=1
   /usr/sbin/nvram set ff_bat_lan_if=br0
   /usr/sbin/nvram set ff_bat_lan_ip=192.168.174.97
   /usr/sbin/nvram set ff_bat_lan_pf=29
   # local internet-bandwidth: This is not internet gw
   /usr/sbin/nvram set ff_bat_gw_uplink=0
   # common used gateway: set no default route
   /usr/sbin/nvram set ff_bat_gw_choose=0
   # preferred gateway
   # HNA
   # Viz server
   # Hello interval (1000ms)
   # Deamon stakeout
   # Stop OLSR
   # Open firewall
   /usr/sbin/nvram set ff_bat_fw=1
   #
   ##########################
   ## Admin > B.A.T.M.A.N. ##
   ##########################
   ssh root@${NEWIP} ipkg install batmand freifunk-batman
   # Next line must be done with expect else nvram not found
   # For now it will be done on reboot anyway
   #ssh root@${NEWIP} /etc/init.d/S66batman restart

The nvram command is usually not in the path over an ssh like that (not interactive, passing the command to ssh as an argument) thus I use /usr/sbin/nvram. In two places this fail:

The freifunk-batman package:
Unpacking freifunk-batman...Done.
Configuring freifunk-batman...//usr/lib/ipkg/info/freifunk-batman.postinst: 10: nvram: not found //usr/lib/ipkg/info/freifunk-batman.postinst: 10: nvram: not found
Done.

And the S66batman restart, which I did manually.

Now the batman runs, has all the nvram settings, though I didn't go through the prompt for network migration via the web interface -- I did the script above. But there are no batman neigbours or messages shown on the info/status pages in the web interface. Even when I reinstalled freifunk-batman two nodes manually, that is via interactive ssh, and there was no error, I am still getting no batman neigbours shown.

Usually I do such cases with expect, there are several places in my freifunk install / upgrade script where I do this). The long term answer is clearly? a trx/bin image of our own.

In the meantime, do I have to reflash them, install batman manually or with expect? Can I even do that or what happens when the web interface is used to enter the network migration info, which is now not happening on my nodes?

regards,
Jan

#1 lore raw

id guess this is a broadcom device running white russian correct ???

Quoted 99 lines · On Sun, Nov 16, 2008 at 10:41 PM, <[email protected]> wrote:

Hi

I have a mesh running freifunk ⒈.6.32 nodes.
I am using the recommended batman0.2 ipkg to test it next to OLSR. (Is there no ipkg package and source for 0.3 or the latest stable?)

When I did two nodes manually, I installed and set the network migration, and saw some batman packets.

Then I went ahead and scripted an install on all the nodes (about 40).

It goes, with dropbear authorized_keys, for each node in $NEWIP:

  # batman sources
  scp root@${NEWIP}:/etc/ipkg.conf .
  patch ipkg.conf < ipkg.conf.patch
  scp ipkg.conf root@${NEWIP}:/etc/ipkg.conf
  # update
  ssh root@${NEWIP} ipkg update
  #########################
  ## Admin > B.A.T.M.A.N ##
  #########################
  # Setup screen for migration of network (only shown once)
  /usr/sbin/nvram set ff_bat_netmig=172.18/172.16
  # B.A.T.M.A.N. on/off
  /usr/sbin/nvram set ff_bat_start=1
  # WLAN as eth1:bat on subnet/16
  /usr/sbin/nvram set ff_bat_ran_on=1
  /usr/sbin/nvram set ff_bat_ran_if=eth1:bat
  /usr/sbin/nvram set ff_bat_ran_ip=172.16.174.97
  /usr/sbin/nvram set ff_bat_ran_pf=16
  # LAN as br0 on subnet/29
  /usr/sbin/nvram set ff_bat_lan_on=1
  /usr/sbin/nvram set ff_bat_lan_if=br0
  /usr/sbin/nvram set ff_bat_lan_ip=192.168.174.97
  /usr/sbin/nvram set ff_bat_lan_pf=29
  # local internet-bandwidth: This is not internet gw
  /usr/sbin/nvram set ff_bat_gw_uplink=0
  # common used gateway: set no default route
  /usr/sbin/nvram set ff_bat_gw_choose=0
  # preferred gateway
  # HNA
  # Viz server
  # Hello interval (1000ms)
  # Deamon stakeout
  # Stop OLSR
  # Open firewall
  /usr/sbin/nvram set ff_bat_fw=1
  #
  ##########################
  ## Admin > B.A.T.M.A.N. ##
  ##########################
  ssh root@${NEWIP} ipkg install batmand freifunk-batman
  # Next line must be done with expect else nvram not found
  # For now it will be done on reboot anyway
  #ssh root@${NEWIP} /etc/init.d/S66batman restart

The nvram command is usually not in the path over an ssh like that (not interactive, passing the command to ssh as an argument) thus I use /usr/sbin/nvram. In two places this fail:

The freifunk-batman package:
Unpacking freifunk-batman...Done.
Configuring freifunk-batman...//usr/lib/ipkg/info/freifunk-batman.postinst:
10: nvram: not found //usr/lib/ipkg/info/freifunk-batman.postinst: 10: nvram: not found Done.

And the S66batman restart, which I did manually.

Now the batman runs, has all the nvram settings, though I didn't go through the prompt for network migration via the web interface -- I did the script above. But there are no batman neigbours or messages shown on the info/status
pages in the web interface. Even when I reinstalled freifunk-batman two nodes manually,
that is via interactive ssh, and there was no error, I am still getting no batman
neigbours shown.

Usually I do such cases with expect, there are several places in my freifunk install / upgrade script where I do this). The long term answer is clearly? a trx/bin image of our own.

In the meantime, do I have to reflash them, install batman manually or with expect? Can I even do that or what happens when the web interface is used to enter the network migration info, which is now not happening on my nodes?

regards,
Jan

_______________________________________________
B.A.T.M.A.N mailing list
[email protected]
https://list.open-mesh.net/mm/listinfo/b.a.t.m.a.n

#2 lore raw

Hi

Quoted 1 line · Outback Dingo

id guess this is a broadcom device running white russian correct ???

1. Yes, Linksys WRT54GL.
2. Sort of, freifunk, which is still based on white russian.

regards,
Jan

#3 lore raw

hrmm ive got a freifunk on kamikaze with olsr on atheros, been trying to find english docs on how to configure it but i used freifunk-ng

Quoted 15 lines · Jan Groenewald

Hi

Quoted 1 line · Outback Dingo

id guess this is a broadcom device running white russian correct ???

1. Yes, Linksys WRT54GL.
2. Sort of, freifunk, which is still based on white russian.

regards,
Jan
_______________________________________________
B.A.T.M.A.N mailing list
[email protected]
https://list.open-mesh.net/mm/listinfo/b.a.t.m.a.n

#4 lore raw

Hi

Quoted 2 lines · Outback Dingo

hrmm ive got a freifunk on kamikaze with olsr on atheros, been trying to find english docs on how to configure it but i used freifunk-ng

Can you point me at a URL for freifunk-ng? Is it batman by default? I am interested in testing the two (OLSR/batman) next to each other.

Is most batman deployments kamikaze or freifunk? Well, most, as there, I gather, are only a few. Is the biggest in germany very customized from freifunk/openwrt?

regards,
Jan

#5 lore raw
In reply to [email protected]

Hi,

Quoted 4 lines

I have a mesh running freifunk â’ˆ.6.32 nodes.
I am using the recommended batman0.2 ipkg to test it next to OLSR. (Is there no ipkg package and source for 0.3 or the latest stable?)

please see our download section to get precompiled packages for your platform:
https://dev.open-mesh.net/batman/wiki/Download

Since 0.3 we fixed a couple of annoying bugs which resulted in a 0.3.1 beta. If you experience major problems you should give a try.

Quoted 7 lines

The freifunk-batman package:
Unpacking freifunk-batman...Done.
Configuring freifunk-batman...//usr/lib/ipkg/info/freifunk-batman.postinst:
10: nvram: not found //usr/lib/ipkg/info/freifunk-batman.postinst: 10:
nvram: not found Done.

And the S66batman restart, which I did manually.

The batman WebUI from Ludger is outdated and not compatible with newer batman versions. You should avoid using it.

Quoted 4 lines

In the meantime, do I have to reflash them, install batman manually or with expect? Can I even do that or what happens when the web interface is used to enter the network migration info, which is now not happening on my nodes?

I think the main problem is the firewall. Batman sends UDP broadcasts on port 4305 and uses 4306 for gateway tunneling. The vis server operates on 4307.

Regards,
Marek

#6 lore raw

Hi

Quoted 2 lines · Marek Lindner

please see our download section to get precompiled packages for your platform:
https://dev.open-mesh.net/batman/wiki/Download

Is there an ipkg.conf line I can use to set the source url?

regards,
Jan

Signature · 4 lines
   .~.     Jan Groenewald
   /V\     IT Manager
  /( )\    +27 21 787 9328
  ^^-^^    www.aims.ac.za
#7 lore raw
Quoted 1 line · On Monday 17 November 2008 00:37:35 Jan Groenewald wrote:

Is there an ipkg.conf line I can use to set the source url?

Sorry, we don't have a complete ipkg repository but you can simply install the whole URL: ipkg install http://downloads.open-mesh.net/batman/<package.ipk>

Regards,
Marek

#8 lore raw

Re: [B.A.T.M.A.N.] ipkg install batman over ssh: postinst failsi

Hi

Quoted 5 lines · Marek Lindner
Quoted 1 line · On Monday 17 November 2008 00:37:35 Jan Groenewald wrote:

Is there an ipkg.conf line I can use to set the source url?

Sorry, we don't have a complete ipkg repository but you can simply install the whole URL: ipkg install http://downloads.open-mesh.net/batman/<package.ipk>

Thanks. Will this still run in test mode next to OLSR? Can I leave the nvram settings as is? Should I uninstall freifunk-batman (is that the webif?). Is there any other webif?

regards,
Jan

Signature · 4 lines
   .~.     Jan Groenewald
   /V\     IT Manager
  /( )\    +27 21 787 9328
  ^^-^^    www.aims.ac.za
#9 lore raw

Re: [B.A.T.M.A.N.] ipkg install batman over ssh: postinst failsi

Quoted 2 lines · On Monday 17 November 2008 00:53:12 Jan Groenewald wrote:

Thanks. Will this still run in test mode next to OLSR? Can I leave the nvram settings as is?

The ipk files from our servers are plain batmand binaries and come without any start skript. How it runs is up to you. I suggest you create a very simple start script for your own needs:

1. create an ip alias for batman (ifconfig eth1:bat x.,x.x.x)
2. start batmand using that interface (batmand eth1:bat)

Another idea: Simply reuse the IPs from your OLSR network - just change the first byte. It will be easier to recognize the nodes.

Quoted 2 lines

Should I uninstall freifunk-batman (is that the
webif?). Is there any other webif?

Yes, uninstall would be best. There is no other web interface I know of. If you update the current webif many people would be happy about it. :-)

Regards,
Marek

#10 lore raw

Re: [B.A.T.M.A.N.] ipkg install batman over ssh: postinst failsi

Hi

Quoted 6 lines · Marek Lindner

The ipk files from our servers are plain batmand binaries and come without any
start skript. How it runs is up to you. I suggest you create a very simple start script for your own needs:

1. create an ip alias for batman (ifconfig eth1:bat x.,x.x.x)
2. start batmand using that interface (batmand eth1:bat)

OK, they seem to be running due to the nvram settings from the previous batmand. I do want them to last over flashes.

Quoted 2 lines

Another idea: Simply reuse the IPs from your OLSR network - just change the first byte. It will be easier to recognize the nodes.

This is done from the previous freifunk-batman network migration.

Quoted 2 lines

Yes, uninstall would be best. There is no other web interface I know of. If you update the current webif many people would be happy about it. :-)

OK, now where is the main config file please? Or is it only nvram, and is it still reading those? So I'm down to the command line only? It is fine, I just want to understand. I won't be doing the webif soon, but maybe later... still learning.

regards,
Jan

#11 lore raw

Re: [B.A.T.M.A.N.] ipkg install batman over ssh: postinst failsi

Quoted 4 lines · On Monday 17 November 2008 01:12:52 Jan Groenewald wrote:

OK, they seem to be running due to the nvram settings from the previous batmand. I do want them to last over flashes.

This is done from the previous freifunk-batman network migration.

Yes, freifunk-batman does this for you. It definitely is good work - just needs some upgrades. It also contains some firewall settings but they open the wrong ports (next to some other issues).

Quoted 4 lines

OK, now where is the main config file please? Or is it only nvram, and is it still reading those? So I'm down to the command line only? It is fine, I just want to understand. I won't be doing the webif soon, but maybe later... still learning.

Batman does not need any config file. Every option (if needed) can be supplied as parameter when starting the application or running the batman client (batmand -c). If you just started I suggets you to have a look at our doc
section: https://dev.open-mesh.net/batman/wiki/UserDocs

I guess the S66batman startup file reads the nvram variables and generates a command line for batman.

Regards,
Marek

#12 lore raw

Re: [B.A.T.M.A.N.] ipkg install batman over ssh: postinst failsi

In reply to Jan Groenewald

Hi,

Quoted 6 lines · Jan Groenewald

Hi

Quoted 3 lines · Marek Lindner
Quoted 1 line · On Monday 17 November 2008 00:37:35 Jan Groenewald wrote:

Is there an ipkg.conf line I can use to set the source url?

Quoted 7 lines
Quoted 3 lines

Sorry, we don't have a complete ipkg repository but you can simply install the whole URL: ipkg install
http://downloads.open-mesh.net/batman/<package.ipk>

Thanks. Will this still run in test mode next to OLSR? Can I leave the nvram settings as is? Should I uninstall freifunk-batman (is that the webif?). Is there any other webif?

The people from Freifunk Leipzig have spend lots of time in integrating batman next to olsr and for freifun/whiterussion based system.

You can find ipk packages in their repository:
http://firmware.leipzig.freifunk.net/svn2ipkg/1/6/10/

Some further informatin is here:
http://wiki.leipzig.freifunk.net/Firmware_Guide
and
http://wiki.leipzig.freifunk.net/BATMAN

PS.: Due to an older mail there is also a traffic/cpu-load statistic plugin available named freifunk-statistics-ng-de-le. To use this you may have to edit the base-port value in /etc/init.d/S97rrdconfig .

Quoted 3 lines

regards,
Jan