Detect builtin wl.ko when EasyOS update
Forum member retiredt00 contributed a fix for updating the broadcom .pet package, that has the wl.ko kernel module, when there is a version update of EasyOS:
https://forum.puppylinux.com/viewtopic.php?p=165617#p165617
Recent discussion about this topic:
https://forum.puppylinux.com/viewtopic.php?p=179914#p179914
A complication now, is that wl.ko may be builtin, not as a separate .pet package. In script /usr/local/easy_version/easy-update, I have added a wrapper around retiredt00's code:
#20260306 retiredt00 ref: https://forum.puppylinux.com/viewtopic.php?p=165617#p165617
# Download the broadcom wireless driver if used and there is a kernel update
#20261115 determine if wl.ko builtin...
WLbuiltin=0
if [ -e /mnt/.easy_ro/linux-kernel-old/usr/lib/modules/${KERNVER}/kernel/drivers/net/wireless/wl.ko ];then
WLbuiltin=1
#elif [ -e /mnt/.easy_ro/easy_sfs/usr/lib/modules/${KERNVER}/kernel/drivers/net/wireless/wl.ko ];then
# WLbuiltin=1
else
unsquashfs -l "$MNTPT2"/easyos/easy.sfs | grep -q -F '/wl.ko'
[ $? -eq 0 ] && WLbuiltin=1
fi
if [ $WLbuiltin -eq 0 ];then
...retiredt00 code...
fi
So, if one of the rollback kernel SFSs is loaded, with wl.ko in it, then no need to update the broadcom .pet.
Or, if decide in some future easy.sfs to have wl.ko builtin, again, no need for a broadcom .pet
The logic seems OK.
Tags: easy