mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
swmodd: fix lxc uninstallation
This commit is contained in:
parent
6dfd959020
commit
17e67528cc
1 changed files with 6 additions and 3 deletions
|
|
@ -16,13 +16,14 @@ is_container_running() {
|
|||
|
||||
|
||||
configure_lxc_container() {
|
||||
local requested_state name ctype du_status BUNDLE
|
||||
local requested_state name ctype du_status BUNDLE section
|
||||
|
||||
ctype="${1}"
|
||||
name="${2}"
|
||||
requested_state="${3}"
|
||||
du_state="${4}"
|
||||
du_status="${4}"
|
||||
BUNDLE="${5}"
|
||||
section="${6}"
|
||||
|
||||
if [ "${ctype}" != "lxc" ]; then
|
||||
return 0;
|
||||
|
|
@ -33,6 +34,8 @@ configure_lxc_container() {
|
|||
if [ -d "${BUNDLE:?}/${name:?}" ]; then
|
||||
rm -rf "${BUNDLE:?}/${name:?}"
|
||||
fi
|
||||
uci_remove ocicontainer "${section}"
|
||||
return 0;
|
||||
fi
|
||||
|
||||
if [ "${requested_state}" = "Idle" ]; then
|
||||
|
|
@ -66,7 +69,7 @@ configure_crun_container() {
|
|||
fi
|
||||
|
||||
if [ "${type}" != "crun" ]; then
|
||||
configure_lxc_container "${type}" "${name}" "${requested_state}" "${du_status}" "${BUNDLE}"
|
||||
configure_lxc_container "${type}" "${name}" "${requested_state}" "${du_status}" "${BUNDLE}" "${1}"
|
||||
return 0;
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue