#!/bin/sh # Refresh index + simulations upgrade/dist-upgrade + held + reboot-check. # Exécuté entier sous sudo par la couche SSH. Non destructif. export LC_ALL=C export DEBIAN_FRONTEND=noninteractive {{#aptProxy}}export http_proxy="{{aptProxy}}"; export https_proxy="{{aptProxy}}" {{/aptProxy}} echo "===SU:APT_UPDATE===" apt-get update -qq 2>&1 UPD=$? echo "===SU:APT_SIM_UPGRADE===" apt-get -s -y upgrade 2>&1 echo "===SU:APT_SIM_DISTUPGRADE===" apt-get -s -y dist-upgrade 2>&1 echo "===SU:APT_HELD===" apt-mark showhold 2>/dev/null echo "===SU:REBOOT===" if [ -f /run/reboot-required ] || [ -f /var/run/reboot-required ]; then echo "REBOOT_REQUIRED=1" [ -f /var/run/reboot-required.pkgs ] && sed 's/^/PKG=/' /var/run/reboot-required.pkgs else echo "REBOOT_REQUIRED=0" fi echo "===SU:EXIT=${UPD}==="