@Paul: good point. here we go:
#!/bin/sh
#
# openbox pipe menu to start network connections
# (This script is only useful if sudo is installed, and correctly configured)
echo '<openbox_pipe_menu>'
# for default file:
echo '<item label="Load Default network.conf">'
echo -n '<action name="Execute"><execute>'
echo -n "sudo /etc/init.d/network.sh restart"
echo '</execute></action>'
echo '</item>'
# for other configuration files (you may state a different directory here
# depending on your setup):
# e.g nice for frugal installs:
# ls /home/tux/network/ | while read; do
ls /etc/network/ | while read; do
echo '<item label="'"${REPLY}"'">'
echo -n '<action name="Execute"><execute>'
echo -n "sudo /etc/init.d/network.sh restart '/etc/network/${REPLY}'"
echo '</execute></action>'
echo '</item>'
done
# To stop connections:
echo '<item label="stop Connection">'
echo -n '<action name="Execute"><execute>'
echo -n "sudo /etc/init.d/network.sh stop"
echo '</execute></action>'
echo '</item>'
echo '</openbox_pipe_menu>'