mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00
Merge branch 'master' of https://github.com/coolsnowwolf/lede
This commit is contained in:
commit
11533a87cc
@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
|
|||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
|
PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
|
||||||
PKG_SOURCE_DATE:=2021-05-05
|
PKG_SOURCE_DATE:=2021-08-13
|
||||||
PKG_SOURCE_VERSION:=021ece84de430fca988acd6934f6046ea59d8c37
|
PKG_SOURCE_VERSION:=9f233f555f80d1c416656c04ab81d19edc738f07
|
||||||
PKG_MIRROR_HASH:=edbe464cadbae000f4a48a6f1e6a0f5d27ae3ad521e308205252ad89639b6f9d
|
PKG_MIRROR_HASH:=01cdadba9e3a8848342f40383ff61cdc91516c9198790ca49dcc6837cdd83351
|
||||||
CMAKE_INSTALL:=1
|
CMAKE_INSTALL:=1
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
@ -90,7 +90,7 @@ endef
|
|||||||
define Package/uxc
|
define Package/uxc
|
||||||
SECTION:=base
|
SECTION:=base
|
||||||
CATEGORY:=Base system
|
CATEGORY:=Base system
|
||||||
DEPENDS:=+procd-ujail +libubus +libubox +libblobmsg-json
|
DEPENDS:=+procd-ujail +libubus +libubox +libblobmsg-json +blockd
|
||||||
TITLE:=OpenWrt container management
|
TITLE:=OpenWrt container management
|
||||||
MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
|
MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
|
||||||
endef
|
endef
|
||||||
|
@ -320,6 +320,78 @@ _procd_add_config_trigger() {
|
|||||||
json_close_array
|
json_close_array
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_procd_add_mount_trigger() {
|
||||||
|
json_add_array
|
||||||
|
_procd_add_array_data "$1"
|
||||||
|
local action="$2"
|
||||||
|
local multi=0
|
||||||
|
shift ; shift
|
||||||
|
|
||||||
|
json_add_array
|
||||||
|
_procd_add_array_data "if"
|
||||||
|
|
||||||
|
if [ "$2" ]; then
|
||||||
|
json_add_array
|
||||||
|
_procd_add_array_data "or"
|
||||||
|
multi=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
while [ "$1" ]; do
|
||||||
|
json_add_array
|
||||||
|
_procd_add_array_data "eq" "target" "$1"
|
||||||
|
shift
|
||||||
|
json_close_array
|
||||||
|
done
|
||||||
|
|
||||||
|
[ $multi = 1 ] && json_close_array
|
||||||
|
|
||||||
|
json_add_array
|
||||||
|
_procd_add_array_data "run_script" /etc/init.d/$name $action
|
||||||
|
json_close_array
|
||||||
|
|
||||||
|
json_close_array
|
||||||
|
_procd_add_timeout
|
||||||
|
json_close_array
|
||||||
|
}
|
||||||
|
|
||||||
|
_procd_add_action_mount_trigger() {
|
||||||
|
local script=$(readlink "$initscript")
|
||||||
|
local name=$(basename ${script:-$initscript})
|
||||||
|
local action="$1"
|
||||||
|
local mpath
|
||||||
|
shift
|
||||||
|
|
||||||
|
_procd_open_trigger
|
||||||
|
_procd_add_mount_trigger mount.add $action "$@"
|
||||||
|
_procd_close_trigger
|
||||||
|
}
|
||||||
|
|
||||||
|
procd_get_mountpoints() {
|
||||||
|
(
|
||||||
|
__procd_check_mount() {
|
||||||
|
local cfg="$1"
|
||||||
|
local path="${2%%/}/"
|
||||||
|
local target
|
||||||
|
config_get target "$cfg" target
|
||||||
|
target="${target%%/}/"
|
||||||
|
[ "$path" != "${path##$target}" ] && echo "${target%%/}"
|
||||||
|
}
|
||||||
|
|
||||||
|
config_load fstab
|
||||||
|
for mpath in "$@"; do
|
||||||
|
config_foreach __procd_check_mount mount "$mpath"
|
||||||
|
done
|
||||||
|
) | sort -u
|
||||||
|
}
|
||||||
|
|
||||||
|
_procd_add_restart_mount_trigger() {
|
||||||
|
_procd_add_action_mount_trigger restart $(procd_get_mountpoints "$@")
|
||||||
|
}
|
||||||
|
|
||||||
|
_procd_add_reload_mount_trigger() {
|
||||||
|
_procd_add_action_mount_trigger reload $(procd_get_mountpoints "$@")
|
||||||
|
}
|
||||||
|
|
||||||
_procd_add_raw_trigger() {
|
_procd_add_raw_trigger() {
|
||||||
json_add_array
|
json_add_array
|
||||||
_procd_add_array_data "$1"
|
_procd_add_array_data "$1"
|
||||||
@ -551,8 +623,11 @@ _procd_wrapper \
|
|||||||
procd_add_raw_trigger \
|
procd_add_raw_trigger \
|
||||||
procd_add_config_trigger \
|
procd_add_config_trigger \
|
||||||
procd_add_interface_trigger \
|
procd_add_interface_trigger \
|
||||||
|
procd_add_mount_trigger \
|
||||||
procd_add_reload_trigger \
|
procd_add_reload_trigger \
|
||||||
procd_add_reload_interface_trigger \
|
procd_add_reload_interface_trigger \
|
||||||
|
procd_add_reload_mount_trigger \
|
||||||
|
procd_add_restart_mount_trigger \
|
||||||
procd_open_trigger \
|
procd_open_trigger \
|
||||||
procd_close_trigger \
|
procd_close_trigger \
|
||||||
procd_open_instance \
|
procd_open_instance \
|
||||||
|
@ -16,3 +16,7 @@ boot() {
|
|||||||
__BOOT_UXC=1
|
__BOOT_UXC=1
|
||||||
start
|
start
|
||||||
}
|
}
|
||||||
|
|
||||||
|
service_triggers() {
|
||||||
|
procd_add_raw_trigger "mount.add" 3000 /etc/init.d/uxc boot
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user