mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
21 lines
471 B
Bash
21 lines
471 B
Bash
#!/bin/sh
|
|
|
|
. /lib/functions.sh
|
|
|
|
# if bundle_root not define in swmodd, update it with lxc path
|
|
lxc=""
|
|
bundle=""
|
|
|
|
if [ -f "/etc/lxc/lxc.conf" ]; then
|
|
lxc=$(cat /etc/lxc/lxc.conf |grep "lxc.lxcpath"| cut -d "=" -f 2)
|
|
fi
|
|
|
|
config_load swmodd
|
|
config_get bundle globals bundle_root ""
|
|
if [ -z "${bundle}" ] && [ -n "${lxc}" ]; then
|
|
uci_set swmodd globals bundle_root ${lxc}
|
|
uci_commit
|
|
elif [ -z "${bundle}" ]; then
|
|
uci_set swmodd globals bundle_root "/tmp/"
|
|
uci_commit
|
|
fi
|