Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

source environment file in all chef extension files #134

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ChefExtensionHandler/bin/chef-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions ChefExtensionHandler/bin/chef-uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion ChefExtensionHandler/bin/chef-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 2 additions & 0 deletions ChefExtensionHandler/disable.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

#!/bin/sh

. /etc/environment

export PATH=/opt/chef/bin:/opt/chef/embedded/bin:$PATH

SCRIPT=$(readlink -f "$0")
Expand Down
2 changes: 2 additions & 0 deletions ChefExtensionHandler/enable.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/sh

. /etc/environment

export PATH=/opt/chef/bin:/opt/chef/embedded/bin:$PATH

SCRIPT=$(readlink -f "$0")
Expand Down