bbb-pre-install.sh: first install aptitude..
This commit is contained in:
@@ -187,11 +187,15 @@ DEFAULT_FQDN_HOSTNAME="$(hostname -f)"
|
|||||||
|
|
||||||
declare -a needed_debian_package_arr=()
|
declare -a needed_debian_package_arr=()
|
||||||
NEEDED_DEBIAN_PACKAGES="
|
NEEDED_DEBIAN_PACKAGES="
|
||||||
|
figlet
|
||||||
|
mc
|
||||||
|
vim
|
||||||
haveged
|
haveged
|
||||||
apt-utils
|
apt-utils
|
||||||
apt-transport-https
|
apt-transport-https
|
||||||
ca-certificates
|
ca-certificates
|
||||||
curl
|
curl
|
||||||
|
lsb-release
|
||||||
software-properties-common
|
software-properties-common
|
||||||
"
|
"
|
||||||
|
|
||||||
@@ -324,6 +328,60 @@ echo -e " \033[32mInstall missing Debian packages\033[m"
|
|||||||
echo -e " \033[1m---\033[m"
|
echo -e " \033[1m---\033[m"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
echononl "Update repositories.."
|
||||||
|
apt-get update > "$log_file" 2>&1
|
||||||
|
if [[ $? -ne 0 ]]; then
|
||||||
|
echo_failed
|
||||||
|
error "$(cat "$log_file")"
|
||||||
|
|
||||||
|
echononl "continue anyway [yes/no]: "
|
||||||
|
read OK
|
||||||
|
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
|
||||||
|
echononl "Wrong entry! - repeat [yes/no]: "
|
||||||
|
read OK
|
||||||
|
done
|
||||||
|
[[ $OK = "yes" ]] || fatal "Interrupted by user."
|
||||||
|
|
||||||
|
else
|
||||||
|
echo_ok
|
||||||
|
fi
|
||||||
|
|
||||||
|
echononl "Upgrade System.."
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get full-upgrade --assume-yes > "$log_file" 2>&1
|
||||||
|
if [[ $? -ne 0 ]]; then
|
||||||
|
echo_failed
|
||||||
|
error "$(cat "$log_file")"
|
||||||
|
|
||||||
|
echononl "continue anyway [yes/no]: "
|
||||||
|
read OK
|
||||||
|
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
|
||||||
|
echononl "Wrong entry! - repeat [yes/no]: "
|
||||||
|
read OK
|
||||||
|
done
|
||||||
|
[[ $OK = "yes" ]] || fatal "Interrupted by user."
|
||||||
|
|
||||||
|
|
||||||
|
echononl "Install package 'aptitude'.."
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get -y install aptitude > "$log_file" 2>&1
|
||||||
|
if [[ $? -eq 0 ]] ; then
|
||||||
|
echo_ok
|
||||||
|
else
|
||||||
|
echo_failed
|
||||||
|
error "$(cat $log_file)"
|
||||||
|
|
||||||
|
echononl "continue anyway [yes/no]: "
|
||||||
|
read OK
|
||||||
|
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
|
||||||
|
echononl "Wrong entry! - repeat [yes/no]: "
|
||||||
|
read OK
|
||||||
|
done
|
||||||
|
[[ $OK = "yes" ]] || fatal "Interrupted by user."
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
_error=false
|
_error=false
|
||||||
: > $log_file
|
: > $log_file
|
||||||
@@ -355,40 +413,6 @@ fi
|
|||||||
|
|
||||||
if [[ ${#needed_debian_package_arr[@]} -gt 0 ]]; then
|
if [[ ${#needed_debian_package_arr[@]} -gt 0 ]]; then
|
||||||
|
|
||||||
echononl "Update repositories.."
|
|
||||||
apt-get update > "$log_file" 2>&1
|
|
||||||
if [[ $? -ne 0 ]]; then
|
|
||||||
echo_failed
|
|
||||||
error "$(cat "$log_file")"
|
|
||||||
|
|
||||||
echononl "continue anyway [yes/no]: "
|
|
||||||
read OK
|
|
||||||
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
|
|
||||||
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
|
|
||||||
echononl "Wrong entry! - repeat [yes/no]: "
|
|
||||||
read OK
|
|
||||||
done
|
|
||||||
[[ $OK = "yes" ]] || fatal "Interrupted by user."
|
|
||||||
|
|
||||||
else
|
|
||||||
echo_ok
|
|
||||||
fi
|
|
||||||
|
|
||||||
echononl "Upgrade System.."
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get full-upgrade --assume-yes > "$log_file" 2>&1
|
|
||||||
if [[ $? -ne 0 ]]; then
|
|
||||||
echo_failed
|
|
||||||
error "$(cat "$log_file")"
|
|
||||||
|
|
||||||
echononl "continue anyway [yes/no]: "
|
|
||||||
read OK
|
|
||||||
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
|
|
||||||
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
|
|
||||||
echononl "Wrong entry! - repeat [yes/no]: "
|
|
||||||
read OK
|
|
||||||
done
|
|
||||||
[[ $OK = "yes" ]] || fatal "Interrupted by user."
|
|
||||||
|
|
||||||
|
|
||||||
for _debian_pkg in ${needed_debian_package_arr[@]} ; do
|
for _debian_pkg in ${needed_debian_package_arr[@]} ; do
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user