change the current dir to the config dir

Otherwise the script can't run in other dirs.
This commit is contained in:
Young 2015-04-23 10:15:54 +08:00
parent 162b0db743
commit f181e98ebd

View File

@ -21,6 +21,12 @@
set -e 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 #clean all init/init.d/configs
function do_backup_clean() { function do_backup_clean() {
#backup all config files #backup all config files
@ -92,7 +98,7 @@ function cpMinion(){
# copy default configs # copy default configs
cp work/default_scripts/etcd /etc/default/ cp work/default_scripts/etcd /etc/default/
cp work/default_scripts/flanneld /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/ cp work/default_scripts/kubelet /etc/default/
} }