docker-ce: Added mkdir for alt_config_file
Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
This commit is contained in:
parent
eb55c8b51a
commit
07c10ae46d
1 changed files with 6 additions and 4 deletions
|
@ -6,7 +6,8 @@ START=25
|
|||
extra_command "uciadd" "Add default bridge configuration to network and firewall uci config"
|
||||
extra_command "ucidel" "Delete default bridge configuration from network and firewall uci config"
|
||||
|
||||
DOCKERD_CONF="/tmp/dockerd/daemon.json"
|
||||
DOCKER_CONF_DIR="/tmp/dockerd"
|
||||
DOCKERD_CONF="${DOCKER_CONF_DIR}/daemon.json"
|
||||
|
||||
uci_quiet() {
|
||||
uci -q "${@}" >/dev/null
|
||||
|
@ -112,14 +113,16 @@ ucidel() {
|
|||
process_config() {
|
||||
local alt_config_file data_root log_level bip
|
||||
|
||||
rm -f "${DOCKERD_CONF}"
|
||||
|
||||
[ -f /etc/config/dockerd ] || {
|
||||
# Use the daemon default configuration
|
||||
DOCKERD_CONF=""
|
||||
return 0
|
||||
}
|
||||
|
||||
# reset configuration
|
||||
rm -fr "${DOCKER_CONF_DIR}"
|
||||
mkdir -p "${DOCKER_CONF_DIR}"
|
||||
|
||||
config_load 'dockerd'
|
||||
|
||||
config_get alt_config_file globals alt_config_file
|
||||
|
@ -144,7 +147,6 @@ process_config() {
|
|||
config_list_foreach globals hosts json_add_array_string
|
||||
json_close_array
|
||||
|
||||
mkdir -p /tmp/dockerd
|
||||
json_dump > "${DOCKERD_CONF}"
|
||||
|
||||
uciupdate "${bip}"
|
||||
|
|
Loading…
Reference in a new issue