pre_install() { # unload old module version modprobe -r 8723bs # trash old module versions find /usr/lib/modules/$(uname -r) -name 8723bs*ko* -exec rm -f {} \; } post_install() { _kver=$(uname -r) echo -e "\nPlease run following command by yourself:\n" echo "sudo depmod -a ${_kver}" echo -e "sudo modprobe 8723bs\n" echo -e "dont forget to update initrd if needed\n" } post_remove() { # delete old module dir find /usr/lib/modules/$(uname -r) -name rtl8723bs -type d -exec rm -rf {} \; }