Index: vendors/Nintendo/common/rc.d/openvpn =================================================================== --- vendors/Nintendo/common/rc.d/openvpn (revision 0) +++ vendors/Nintendo/common/rc.d/openvpn (revision 0) @@ -0,0 +1,26 @@ +#!/bin/sh + +[ -e /etc/rc.defaults ] && . /etc/rc.defaults +[ -e /etc/rc.conf ] && . /etc/rc.conf + +DAEMON=openvpn +CONFIG=/etc/openvpn.conf +case "$1" in + start) + echo "Starting $DAEMON" + $DAEMON --config=$CONFIG& + ;; + stop) + echo "Stopping $DAEMON" + kill -9 `pidof $DAEMON` + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "Usage: $0 " + exit 1 + ;; +esac + Property changes on: vendors/Nintendo/common/rc.d/openvpn ___________________________________________________________________ Name: svn:executable + * Index: vendors/Nintendo/common/rc.defaults =================================================================== --- vendors/Nintendo/common/rc.defaults (revision 1979) +++ vendors/Nintendo/common/rc.defaults (working copy) @@ -111,6 +111,10 @@ # Don't forget to edit /etc/inetd.conf! start_inetd="NO" +# To start openvpn on boot say "YES" here +# Please read /etc/openvpn.conf.example +start_openvpn="NO" + # If you want to see your DS firmware version on boot, # set this to "YES". By default, the firmware version is shown. show_firmware_version="YES" Index: vendors/Nintendo/common/rc.common =================================================================== --- vendors/Nintendo/common/rc.common (revision 1979) +++ vendors/Nintendo/common/rc.common (working copy) @@ -54,6 +54,16 @@ fi fi +if [ "$start_openvpn" = "YES" ] +then + if [ "$__network_up" = "YES" ] + then + /etc/rc.d/openvpn start + else + echo "Not starting openvpn: network is down" + fi +fi + # set hostname hostname $hostname Index: vendors/Nintendo/DLDI/config.vendor =================================================================== --- vendors/Nintendo/DLDI/config.vendor (revision 1979) +++ vendors/Nintendo/DLDI/config.vendor (working copy) @@ -262,6 +262,7 @@ # CONFIG_USER_NTPD_NTPDATE is not set # CONFIG_USER_NTPD_NTPQ is not set # CONFIG_USER_OPENSSL_APPS is not set +CONFIG_USER_OPENVPN=y CONFIG_USER_PING_PING=y # CONFIG_USER_PLUG_PLUG is not set # CONFIG_USER_POP3PROXY_POP3PROXY is not set Index: vendors/Nintendo/DLDI/config.linux-2.6.x =================================================================== --- vendors/Nintendo/DLDI/config.linux-2.6.x (revision 1979) +++ vendors/Nintendo/DLDI/config.linux-2.6.x (working copy) @@ -393,7 +393,7 @@ # CONFIG_DUMMY is not set # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set +CONFIG_TUN=y # # PHY device support Index: vendors/Nintendo/DLDI/Makefile =================================================================== --- vendors/Nintendo/DLDI/Makefile (revision 1979) +++ vendors/Nintendo/DLDI/Makefile (working copy) @@ -11,7 +11,7 @@ ROMFS_DIRS := boot dev proc sbin $(FATFS)/linux $(OPTDIR) tmp -FS_DIRS := etc/rc.d home lib usr/bin usr/games usr/lib usr/share/udhcpc var/tmp var/run +FS_DIRS := etc/rc.d home lib usr/bin usr/games usr/lib usr/share/udhcpc var/tmp var/run var/log DEVICES := \ tty,c,5,0 console,c,5,1 cua0,c,5,64 cua1,c,5,65 \ @@ -40,6 +40,7 @@ \ mtd0,c,90,0 firmware,c,90,2 \ \ + tun,c,10,200 \ tty0,c,4,0 tty1,c,4,1 tty2,c,4,2 tty3,c,4,3 \ tty4,c,4,4 tty5,c,4,5 tty6,c,4,6 tty7,c,4,7 \ \ Index: config/Configure.help =================================================================== --- config/Configure.help (revision 1979) +++ config/Configure.help (working copy) @@ -592,6 +592,12 @@ CONFIG_USER_OPENSWAN The Openswan tools and applications +CONFIG_USER_OPENVPN + OpenVPN is a full-featured SSL VPN solution which can accomodate a wide + range of configurations, including remote access, site-to-site VPNs, WiFi + security, and enterprise-scale remote access solutions with load balancing, + failover, and fine-grained access-controls + CONFIG_USER_PING_PING Diagnostic tool for testing network connections. Approx. binary size: 27k Index: config/config.in =================================================================== --- config/config.in (revision 1979) +++ config/config.in (working copy) @@ -504,6 +504,7 @@ if [ "$CONFIG_USER_OPENSSL_APPS" = "y" ]; then define_bool CONFIG_LIB_LIBSSL y fi +bool 'openvpn' CONFIG_USER_OPENVPN bool 'ping' CONFIG_USER_PING_PING bool 'plugdaemon' CONFIG_USER_PLUG_PLUG Index: user/openvpn/Makefile =================================================================== --- user/openvpn/Makefile (revision 0) +++ user/openvpn/Makefile (revision 0) @@ -0,0 +1,27 @@ +# Makefile for Openvpn + +all: .compiled + +OPENVPN_CONFIGURE_FLAGS=--disable-lzo --includedir=$(ROOTDIR)/include\ + --libdir=$(ROOTDIR)/lib --with-ifconfig-path=/bin/ifconfig + +ifeq ($(CONFIG_CONFIG_LIB_LIBSSL),y) +OPENVPN_CONFIGURE_FLAGS+=--with-ssl-lib=$(ROOTDIR)/lib/libssl +endif + +.configured: + cd src && ./configure --host=arm-linux-elf \ + --prefix=/nonexistent $(OPENVPN_CONFIGURE_FLAGS) + touch $@ + +.compiled: .configured + $(MAKE) -C src + touch $@ + +clean: + -[ -f src/Makefile ] && $(MAKE) -C src distclean + rm -f .configured .compiled + +romfs: + $(ROMFSINST) src/openvpn /bin/openvpn + $(ROMFSINST) openvpn.conf.example /etc/openvpn.conf.example Index: user/openvpn/openvpn.conf.example =================================================================== --- user/openvpn/openvpn.conf.example (revision 0) +++ user/openvpn/openvpn.conf.example (revision 0) @@ -0,0 +1,9 @@ +# Here is a simple example config for openvpn +# See here for more info http://openvpn.net/static.html + +dev-node /dev/tun +dev tun +ifconfig 10.8.0.1 10.8.0.2 +log-append /var/log/openvpn.log +pid /var/run/openpvn.pid +secret /etc/static.key