2022-10-03 02:52:43 +00:00
|
|
|
# prepare_host_basic
|
|
|
|
|
#
|
|
|
|
|
# * installs only basic packages
|
|
|
|
|
#
|
2022-10-08 11:17:30 +00:00
|
|
|
prepare_host_basic() {
|
2022-10-03 02:52:43 +00:00
|
|
|
|
|
|
|
|
# command:package1 package2 ...
|
|
|
|
|
# list of commands that are neeeded:packages where this command is
|
|
|
|
|
local check_pack install_pack
|
|
|
|
|
local checklist=(
|
2022-10-08 11:17:30 +00:00
|
|
|
"dialog:dialog"
|
|
|
|
|
"fuser:psmisc"
|
|
|
|
|
"getfacl:acl"
|
|
|
|
|
"uuid:uuid uuid-runtime"
|
|
|
|
|
"curl:curl"
|
|
|
|
|
"gpg:gnupg"
|
|
|
|
|
"gawk:gawk"
|
|
|
|
|
)
|
2022-10-03 02:52:43 +00:00
|
|
|
|
|
|
|
|
for check_pack in "${checklist[@]}"; do
|
2022-10-08 11:17:30 +00:00
|
|
|
if ! which ${check_pack%:*} > /dev/null; then local install_pack+=${check_pack#*:}" "; fi
|
2022-10-03 02:52:43 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
|
|
if [[ -n $install_pack ]]; then
|
2022-11-11 10:48:26 +00:00
|
|
|
display_alert "Updating and installing basic packages on host" "$install_pack"
|
2022-10-03 02:52:43 +00:00
|
|
|
sudo bash -c "apt-get -qq update && apt-get install -qq -y --no-install-recommends $install_pack"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
}
|