#!/bin/bash
cd /root
wget http://mirrors.slackware.com/slackware/slackware64/slackware64/ap/squashfs-tools-4.5-x86_64-2.txz
installpkg /root/squashfs-tools-4.5-x86_64-2.txz
mkdir /mnt0 /mnt1
mount -t squashfs /boot/bzmodules /mnt1
cp -r /mnt1/* /mnt0
mkdir -p /lib/modules/6.1.49-Unraid/updates
cp -f /boot/arcmsr.ko.xz /lib/modules/6.1.49-Unraid/updates
depmod -a
cp -rf /lib/modules/6.1.49-Unraid /mnt0/modules
mv /boot/bzmodules /boot/bzmodules0
mv /boot/bzmodules.sha256 /boot/bzmodules0.sha256
mksquashfs /mnt0 /boot/bzmodules -comp xz -Xbcj x86
sha256sum /boot/bzmodules > /boot/bzmodules.sha256
umount /mnt1
rm -rf /mnt0
