Comment 5 for bug 1742903

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Something like:

[[ `iucode_tool -s $(sudo iucode_tool --scan-system=2 2>&1 | sed 's/.*\(0x.*\)$/\1/') -l /lib/firmware/intel-ucode/ | sed -n 's/.* rev \(0x....\),.*/\1/p'` -eq `sudo cat /sys/devices/system/cpu/cpu0/microcode/version` ]] || echo 'Trigger reboot'

should be good enough.... with bashism... as the kernel file is 0x1f, yet the tool reports 0x001f.

There will be false negatives, and false positives, but overall should be better than the current behavior.

Obviously, no need for sudo, if inside the postinst.