Skip to content

Commit

Permalink
Remove cloud-init package from all OS nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
electrocucaracha committed Aug 17, 2024
1 parent b4dc9bc commit fe53565
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ if [[ ${OS_DEBUG:-false} == "true" ]]; then
export PKG_DEBUG=true
set -o xtrace
fi

# shellcheck disable=SC1091
source /etc/os-release || source /usr/lib/os-release

_start=$(date +%s)
trap 'printf "Node setup process: %s secs\n" "$(($(date +%s)-_start))"' EXIT

Expand All @@ -33,8 +37,6 @@ function mount_external_partition {
local mount_dir=$2

if ! command -v sfdisk >/dev/null; then
# shellcheck disable=SC1091
source /etc/os-release || source /usr/lib/os-release
case ${ID,,} in
ubuntu | debian)
sudo apt-get update -qq >/dev/null
Expand Down Expand Up @@ -67,6 +69,14 @@ while getopts "h?v:c:" opt; do
esac
done

if ! command -v cloud-init >/dev/null; then
case ${ID,,} in
ubuntu | debian)
sudo apt-get -y -qq purge cloud-init
;;
esac
fi

if [ -n "${dict_volumes-}" ]; then
for kv in ${dict_volumes//,/ }; do
mount_external_partition "${kv%=*}" "${kv#*=}"
Expand Down

0 comments on commit fe53565

Please sign in to comment.