Skip to content

Commit b24592f

Browse files
committed
Fix upgrades available message
The string that needs parsing when checking for upgrades is different when using dnf5. This change should introduced for Fedora 41 and 42, which use dnf5 by default. Signed-off-by: Manuel Fombuena <mfombuena@innovara.tech>
1 parent 18a0ffe commit b24592f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sysmotd/sysmotd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ NEED_UPDATE="FALSE"
122122
[ -z "$(find "$updates" -newermt 'now-60 minutes' 2> /dev/null)" ] && NEED_UPDATE="TRUE"
123123

124124
if [[ "$NEED_UPDATE" = "TRUE" ]]; then
125-
n_updates=$(dnf update --assumeno --cacheonly --noplugins | awk '/^Upgrade/ {print $2;}')
125+
n_updates=$(dnf update --assumeno --cacheonly --noplugins | awk '/^ Upgrading/ {print $2;}')
126126
if [[ $n_updates -eq 0 ]]; then
127127
echo -e "There were no updates available when last checked.\n" > $updates
128128
elif [[ $n_updates -eq 1 ]]; then

0 commit comments

Comments
 (0)