From f181e98ebdc0b8e88ec41f821d157d9503bde573 Mon Sep 17 00:00:00 2001 From: Young Date: Thu, 23 Apr 2015 10:15:54 +0800 Subject: [PATCH] change the current dir to the config dir Otherwise the script can't run in other dirs. --- cluster/ubuntu-cluster/configure.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cluster/ubuntu-cluster/configure.sh b/cluster/ubuntu-cluster/configure.sh index eaf8adb525b..98a0cd2e89e 100755 --- a/cluster/ubuntu-cluster/configure.sh +++ b/cluster/ubuntu-cluster/configure.sh @@ -21,6 +21,12 @@ set -e + +# get the full path of configure dir and set $PWD to it. +CONFIG_DIR=`dirname "$0"` +CONFIG_DIR=`cd "$CONFIG_DIR"; pwd` +cd $CONFIG_DIR + #clean all init/init.d/configs function do_backup_clean() { #backup all config files @@ -92,7 +98,7 @@ function cpMinion(){ # copy default configs cp work/default_scripts/etcd /etc/default/ cp work/default_scripts/flanneld /etc/default/ - cp work/default_scripts/kube-proxy /etc/default + cp work/default_scripts/kube-proxy /etc/default/ cp work/default_scripts/kubelet /etc/default/ }