Fixed Debian upgrade commands
This commit is contained in:
10
functions.sh
10
functions.sh
@@ -53,7 +53,7 @@ UpdatePackages () {
|
||||
#Getting distributionname
|
||||
if [[ "${DIST}" == *"ubuntu"* ]] || [[ "${DIST}" == *"debian"* ]]; then
|
||||
$INSTCALL -- apt update
|
||||
$INSTCALL -- DEBIAN_FRONTEND=noninteractive apt upgrade -y -o Dpkg::Options::="--force-confold"
|
||||
$INSTCALL -- sh -c "DEBIAN_FRONTEND=noninteractive apt upgrade -y -o Dpkg::Options::="--force-confold""
|
||||
elif [[ "${DIST}" == *"alpine"* ]]; then
|
||||
$INSTCALL -- apk update
|
||||
$INSTCALL -- apk upgrade
|
||||
@@ -168,16 +168,16 @@ UpgradeRelease () {
|
||||
$SNAPSHOTCMD "Before upgrade form Debian $RELNAME to Debian $NewDebianVersion"
|
||||
#Fully update current version
|
||||
$INSTCALL -- apt update
|
||||
$INSTCALL -- DEBIAN_FRONTEND=noninteractive apt upgrade -y -o Dpkg::Options::="--force-confold"
|
||||
$INSTCALL -- DEBIAN_FRONTEND=noninteractive apt full-upgrade -y -o Dpkg::Options::="--force-confold"
|
||||
$INSTCALL -- sh -c "DEBIAN_FRONTEND=noninteractive apt upgrade -y -o Dpkg::Options::="--force-confold""
|
||||
$INSTCALL -- sh -c "DEBIAN_FRONTEND=noninteractive apt full-upgrade -y -o Dpkg::Options::="--force-confold""
|
||||
# Update repo file(s)
|
||||
$INSTCALL -- sed -i "s/$RELNAME/$NewDebianVersion/g" /etc/apt/sources.list
|
||||
$INSTCALL -- sh -c "sed -i "s/$RELNAME/$NewDebianVersion/g" /etc/apt/sources.list.d/\*"
|
||||
# Run upgrade to new release
|
||||
$INSTCALL -- apt clean
|
||||
$INSTCALL -- apt update
|
||||
$INSTCALL -- DEBIAN_FRONTEND=noninteractive apt upgrade -y -o Dpkg::Options::="--force-confold"
|
||||
$INSTCALL -- DEBIAN_FRONTEND=noninteractive apt full-upgrade -y -o Dpkg::Options::="--force-confold"
|
||||
$INSTCALL -- sh -c "DEBIAN_FRONTEND=noninteractive apt upgrade -y -o Dpkg::Options::="--force-confold""
|
||||
$INSTCALL -- sh -c "DEBIAN_FRONTEND=noninteractive apt full-upgrade -y -o Dpkg::Options::="--force-confold""
|
||||
$INSTCALL -- apt autoremove -y
|
||||
DOREBOOT=true
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user