From c83756a3e99473bc0293b484f2b13967aa7e0f41 Mon Sep 17 00:00:00 2001 From: Arif Ali Date: Wed, 30 Dec 2020 13:28:37 +0000 Subject: [PATCH] Remove the need for bc --- functions.sh | 4 ++-- user-data.yaml | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/functions.sh b/functions.sh index 471e8ea..dbb3676 100644 --- a/functions.sh +++ b/functions.sh @@ -7,7 +7,7 @@ state_timeout=1200 install_deps() { # Install some of the dependent packages - deps="jq bc" + deps="jq" if [[ "$0" == "*manage-maas-*" ]] ; then deps+=" virtinst" fi @@ -80,7 +80,7 @@ ensure_machine_in_state() # We will continue to check the state of the machine to see if it is in # $state or the timeout has occured, which defaults to 20 mins - while [[ ${status_name} != "${state}" ]] && [[ $( echo ${time_end} - ${time_start} | bc ) -le ${timeout} ]] + while [[ ${status_name} != "${state}" ]] && [[ $(( ${time_end} - ${time_start} )) -le ${timeout} ]] do # Check every 20 seconds of the state sleep 20 diff --git a/user-data.yaml b/user-data.yaml index f6d20bc..77baa87 100644 --- a/user-data.yaml +++ b/user-data.yaml @@ -24,7 +24,6 @@ users: ## Install additional packages on first boot packages: - virtinst - - bc - jq - ksmtuned