pentoo-updater: diff returns 0 if there are no changes, which is what we are trying to test for here

This commit is contained in:
Rick Farina (Zero_Chaos) 2019-03-19 16:10:00 -04:00
parent 95730612a1
commit 147a86286b
No known key found for this signature in database
GPG key ID: A5DD1427DD11F94A

View file

@ -118,7 +118,7 @@ update_kernel() {
if [ "${currkern}" != "${bestkern}" ]; then
printf "Currently running kernel ${currkern} is out of date.\n"
if [ -x "/usr/src/linux-${bestkern}/vmlinux" ] && [ -r "/lib/modules/${bestkern}/modules.dep" ]; then
if [ -r /etc/kernels/kernel-config-${ARCHY}-${bestkern} ] && ! diff -Naur /usr/src/linux/.config /etc/kernels/kernel-config-${ARCHY}-${bestkern} > /dev/null 2>&1 && \
if [ -r /etc/kernels/kernel-config-${ARCHY}-${bestkern} ] && diff -Naur /usr/src/linux/.config /etc/kernels/kernel-config-${ARCHY}-${bestkern} > /dev/null 2>&1 && \
[ ! -e /usr/src/linux/.pentoo-updater-running ]; then
printf "Kernel ${bestkern} appears ready to go, please reboot when convenient.\n"
return 1