Updating for noninteractive shell for ubuntu updates.

This commit is contained in:
Adsooi 2023-08-19 19:34:07 +02:00
parent a9454db32f
commit e6cf08c18c
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160

View file

@ -34,7 +34,7 @@ update_non_root() {
count=$(apt list --upgradeable | wc -l) # Count, with 1 additional line
if [[ $count -ne 1 ]]; then
info "Updating $(expr $count - 1) packets..."
run_as_root "apt-get dist-upgrade -y"
run_as_root "apt-get dist-upgrade -y -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold'"
success "System has been updated!"
else
success "System up to date."
@ -49,7 +49,7 @@ update_as_root() {
count=$(apt list --upgradeable | wc -l) # Count, with 1 additional line
if [[ $count -ne 1 ]]; then
info "Updating $(expr $count - 1) packets..."
apt-get dist-upgrade -y
apt-get dist-upgrade -y -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold'
success "System has been updated!"
else
success "System up to date."