define Package/openvpn/install
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/openvpn $(1)/usr/sbin/
+ $(INSTALL_DIR) $(1)/etc/init.d/
+ $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
+ $(INSTALL_DIR) $(1)/etc/default
+ $(INSTALL_BIN) files/$(PKG_NAME).default $(1)/etc/default/$(PKG_NAME)
endef
define Package/openvpn-easy-rsa/install
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2007 OpenWrt.org
+
+START=70
+BIN=openvpn
+DEFAULT=/etc/default/$BIN
+RUN_D=/var/run
+PID_F=$RUN_D/$BIN.pid
+
+start() {
+ [ -f $DEFAULT ] && . $DEFAULT
+ mkdir -p $RUN_D
+ $BIN $OPTIONS
+}
+
+stop() {
+ [ -f $PID_F ] && kill $(cat $PID_F)
+}