diff --git a/ChefExtensionHandler/bin/chef-install.sh b/ChefExtensionHandler/bin/chef-install.sh index 5ad379e3..b0c32329 100755 --- a/ChefExtensionHandler/bin/chef-install.sh +++ b/ChefExtensionHandler/bin/chef-install.sh @@ -204,8 +204,9 @@ auto_update_false=/etc/chef/.auto_update_false if [ -f $auto_update_false ]; then echo "[$(date)] Not doing install, as auto update is false" else - get_chef_package_from_omnitruck + . /etc/environment + get_chef_package_from_omnitruck export PATH=/opt/chef/bin/:/opt/chef/embedded/bin:$PATH # check if azure-chef-extension is installed diff --git a/ChefExtensionHandler/bin/chef-uninstall.sh b/ChefExtensionHandler/bin/chef-uninstall.sh index f889d908..6ce81fc9 100755 --- a/ChefExtensionHandler/bin/chef-uninstall.sh +++ b/ChefExtensionHandler/bin/chef-uninstall.sh @@ -49,6 +49,8 @@ check_uninstallation_status(){ ########### Script starts from here ################### linux_distributor=$(get_linux_distributor) +. /etc/environment + auto_update_false=/etc/chef/.auto_update_false export PATH=/opt/chef/embedded/bin:/opt/chef/bin:$PATH diff --git a/ChefExtensionHandler/bin/chef-update.sh b/ChefExtensionHandler/bin/chef-update.sh index f54c7c4d..232e8720 100755 --- a/ChefExtensionHandler/bin/chef-update.sh +++ b/ChefExtensionHandler/bin/chef-update.sh @@ -8,9 +8,11 @@ # 4 uninstall old version # 5 enable new version -# returns script dir +. /etc/environment + export PATH=/opt/chef/bin/:/opt/chef/embedded/bin:$PATH +# returns script dir get_script_dir(){ SCRIPT=$(readlink -f "$0") script_dir=`dirname $SCRIPT` diff --git a/ChefExtensionHandler/disable.sh b/ChefExtensionHandler/disable.sh index 4eeafd89..d1fd0f09 100755 --- a/ChefExtensionHandler/disable.sh +++ b/ChefExtensionHandler/disable.sh @@ -1,6 +1,8 @@ #!/bin/sh +. /etc/environment + export PATH=/opt/chef/bin:/opt/chef/embedded/bin:$PATH SCRIPT=$(readlink -f "$0") diff --git a/ChefExtensionHandler/enable.sh b/ChefExtensionHandler/enable.sh index 8ca57040..73cf90d8 100755 --- a/ChefExtensionHandler/enable.sh +++ b/ChefExtensionHandler/enable.sh @@ -1,5 +1,7 @@ #!/bin/sh +. /etc/environment + export PATH=/opt/chef/bin:/opt/chef/embedded/bin:$PATH SCRIPT=$(readlink -f "$0")