diff --git a/Linux_reinstall/updatemotd/90-footer b/Linux_reinstall/updatemotd/90-footer index a146f7a..a60bcb7 100644 --- a/Linux_reinstall/updatemotd/90-footer +++ b/Linux_reinstall/updatemotd/90-footer @@ -25,9 +25,9 @@ fi apt list --upgradable | awk 'END{print NR}' | tee -a "$UpdateLog" > /dev/null 2>&1 UpdateRemind=`cat $UpdateLog | tail -n 1` -Result=$(echo $UpdateRemind) -if [ "$Result" -ge "1" ]; then - printf "$UpdateRemind packages can be upgraded. Run 'apt list --upgradable' to see them.\n" +UpdateNum=`expr $UpdateRemind - 1` +if [ "$UpdateNum" -ge "1" ]; then + printf "$UpdateNum packages can be upgraded. Run 'apt list --upgradable' to see them.\n" fi rm -rf $UpdateLog