Create state dir before trying to touch file in it

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack 2017-11-16 14:30:54 +00:00
parent 10bae91564
commit 4a4db4642f

View File

@ -82,6 +82,7 @@ if [ -n "${KUBE_CLEAR_STATE}" ] ; then
fi
fi
mkdir -p "${state}"
touch $state/metadata.json
if [ -n "${kubeadm_data}" ] ; then
echo "{ \"kubeadm\": { \"entries\": { ${kubeadm_data} } } }" > $state/metadata.json