Updating for noninteractive shell for ubuntu updates.
This commit is contained in:
parent
a9454db32f
commit
e6cf08c18c
1 changed files with 2 additions and 2 deletions
|
@ -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."
|
||||
|
|
Loading…
Reference in a new issue