| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- --- a/package/feeds/custom/openvpn/files/etc/hotplug.d/openvpn/01-user
- +++ b/package/feeds/custom/openvpn/files/etc/hotplug.d/openvpn/01-user
- @@ -2,10 +2,10 @@
-
- . /lib/functions/openvpn.sh
-
- -[ -e "/etc/openvpn.user" ] && {
- +[ -e "/etc/openvpn/openvpn.user" ] && {
- env -i ACTION="$ACTION" INSTANCE="$INSTANCE" \
- /bin/sh \
- - /etc/openvpn.user \
- + /etc/openvpn/openvpn.user \
- $*
- }
-
- --- a/package/feeds/custom/openvpn/files/openvpn.init
- +++ b/package/feeds/custom/openvpn/files/openvpn.init
- @@ -107,7 +107,6 @@
- local name="$1"
- local dir="$2"
- local conf="$3"
- - local security="$4"
-
- procd_open_instance "$name"
- procd_set_param command "$PROG" \
- @@ -117,7 +116,7 @@
- --config "$conf" \
- --up "/usr/libexec/openvpn-hotplug up $name" \
- --down "/usr/libexec/openvpn-hotplug down $name" \
- - --script-security "${security:-2}" \
- + --script-security 2 \
- $(openvpn_get_dev "$name" "$conf")
- procd_set_param file "$dir/$conf"
- procd_set_param term_timeout 15
- @@ -139,14 +138,11 @@
- return 1
- }
-
- - local script_security
- - config_get script_security "$s" script_security
- -
- [ ! -d "/var/run" ] && mkdir -p "/var/run"
-
- if [ ! -z "$config" ]; then
- append UCI_STARTED "$config" "$LIST_SEP"
- - openvpn_add_instance "$s" "${config%/*}" "$config" "$script_security"
- + openvpn_add_instance "$s" "${config%/*}" "$config"
- return
- fi
-
- @@ -157,7 +153,7 @@
- append_params "$s" $OPENVPN_PARAMS
- append_list "$s" $OPENVPN_LIST
-
- - openvpn_add_instance "$s" "/var/etc" "openvpn-$s.conf" "$script_security"
- + openvpn_add_instance "$s" "/var/etc" "openvpn-$s.conf"
- }
-
- start_service() {
- --- a/package/feeds/custom/openvpn/Makefile
- +++ b/package/feeds/custom/openvpn/Makefile
- @@ -100,20 +100,13 @@
- )
- endef
-
- -define Package/openvpn-$(BUILD_VARIANT)/conffiles
- -/etc/config/openvpn
- -/etc/openvpn.user
- -endef
- -
- define Package/openvpn-$(BUILD_VARIANT)/install
- $(INSTALL_DIR) \
- $(1)/usr/sbin \
- $(1)/usr/share/openvpn \
- $(1)/etc/init.d \
- - $(1)/etc/config \
- $(1)/etc/openvpn \
- $(1)/lib/functions \
- - $(1)/lib/upgrade/keep.d \
- $(1)/usr/libexec \
- $(1)/etc/hotplug.d/openvpn
-
- @@ -139,18 +132,11 @@
-
- $(INSTALL_DATA) \
- files/etc/openvpn.user \
- - $(1)/etc/openvpn.user
- + $(1)/etc/openvpn/openvpn.user
-
- $(INSTALL_DATA) \
- files/openvpn.options \
- $(1)/usr/share/openvpn/openvpn.options
- -
- - $(INSTALL_CONF) files/openvpn.config \
- - $(1)/etc/config/openvpn
- -
- - $(INSTALL_DATA) \
- - files/openvpn.upgrade \
- - $(1)/lib/upgrade/keep.d/openvpn
- endef
-
- $(eval $(call BuildPackage,openvpn-openssl))
|