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 15, 2024
1 parent 66214ae commit b0ba282
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 b0ba282

Please sign in to comment.