mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-28 06:59:28 +08:00
Compare commits
1 Commits
devel-no-h
...
lxc_as_du
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
11fa92a702 |
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=swmodd
|
||||
PKG_VERSION:=2.3.3
|
||||
PKG_VERSION:=2.3.4
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/lcm/swmodd.git
|
||||
PKG_SOURCE_VERSION:=f73adba35daa8e24b7f28dc73eb58f53761a0d3b
|
||||
PKG_SOURCE_VERSION:=d29418d26e630894079de73fae66bf04b5db0ab3
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -14,6 +14,34 @@ is_container_running() {
|
||||
return $?
|
||||
}
|
||||
|
||||
|
||||
configure_lxc_container() {
|
||||
local requested_state name ctype du_status BUNDLE
|
||||
|
||||
ctype="${1}"
|
||||
name="${2}"
|
||||
requested_state="${3}"
|
||||
du_state="${4}"
|
||||
BUNDLE="${5}"
|
||||
|
||||
if [ "${ctype}" != "lxc" ]; then
|
||||
return 0;
|
||||
fi
|
||||
|
||||
if [ "${du_status}" = "Uninstalling" ]; then
|
||||
lxc-stop -q -k "${name}"
|
||||
if [ -d "${BUNDLE:?}/${name:?}" ]; then
|
||||
rm -rf "${BUNDLE:?}/${name:?}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${requested_state}" = "Idle" ]; then
|
||||
lxc-stop -q -k "${name}"
|
||||
elif [ "${requested_state}" = "Active" ]; then
|
||||
lxc-start -q "${name}" >/dev/null 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
configure_crun_container() {
|
||||
local name type autostart du_status requested_state url username password
|
||||
local BRIDGE BUNDLE BOOT
|
||||
@@ -38,6 +66,7 @@ configure_crun_container() {
|
||||
fi
|
||||
|
||||
if [ "${type}" != "crun" ]; then
|
||||
configure_lxc_container "${type}" "${name}" "${requested_state}" "${du_status}" "${BUNDLE}"
|
||||
return 0;
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user