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. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1742903 Title: Microcode updates require a reboot to apply, but package postinst doesn't touch /run/reboot-required To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/intel-microcode/+bug/1742903/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
