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