89e439ed41
This does not buld because its "configure" requires that -llzo contains "lzolx_decompress". "vtun" does not build, evenm if liblzo is available. The LZO package currently used by buildroot does not contain ANY reference to "lzolx_decompress" "vtun" has been upgraded to 3.0.2 and now builds OK, but is yet to be tested on a target. The previous patch containing three diffs, has been broken up into three files. The second patch fails. This patch tries to replace a perl script ($(VTUN_DIR)/scripts/vtund.rc.debian) with a shell script with the same name. In vtun-3.0.2, vtund.rc.debian is a shell script which is fairly similar to the shell script provided by the patch. For now, it has been decided not to replace this shell script with the script generated by the patch for 2.6 vtun will thus be built with the 3.0.2 vtund.rc.debian. The start-stop-daemon parameters and other things in this script may be inappropriate for something based on busybox. I will leave the decision which script to use, the 2-6 script or the 3.0.2 script to someone else. Both files are kept in the directory, but should be removed once it has been decided what to do about this script. Signed-Off by: Ulf Samuelsson <ulf.samuelsson@atmel.com>
51 lines
1.2 KiB
Bash
51 lines
1.2 KiB
Bash
#! /bin/sh
|
|
#
|
|
|
|
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
|
DAEMON=/usr/sbin/vtund
|
|
CONFFILE=/etc/vtund-start.conf
|
|
PIDPREFIX=/var/run/vtund
|
|
|
|
test -f $DAEMON || exit 0
|
|
|
|
case "$1" in
|
|
start)
|
|
# find all the defined tunnels
|
|
egrep -v '^[:space:]*(#.*)?$' $CONFFILE | while true;
|
|
do
|
|
read i
|
|
# no more lines available? done, then.
|
|
if [ $? != 0 ] ; then break; fi
|
|
SARGS=`echo $i|sed -ne 's/--server--\s*/-s -P /p'`;
|
|
if [ -n "$SARGS" ];
|
|
then
|
|
echo "Starting vtund server."
|
|
start-stop-daemon -S -x $DAEMON -- $SARGS;
|
|
else
|
|
# split args into host and rest
|
|
HOST=`echo $i|cut -f 1 -d " "`;
|
|
TARGET=`echo $i|cut -f 2 -d " "`;
|
|
echo "Starting vtund client $HOST to $TARGET.";
|
|
start-stop-daemon -S -x $DAEMON -- $i;
|
|
|
|
fi
|
|
done
|
|
;;
|
|
stop)
|
|
echo "Stopping vtund.";
|
|
start-stop-daemon -K -x vtund;
|
|
;;
|
|
|
|
restart|reload|force-reload)
|
|
$0 stop
|
|
sleep 1;
|
|
$0 start
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
exit 0
|
|
|