Posted on 01-08-2015 06:40 AM
I'm running into an issue with the disableBluetooth.sh script JAMF provides here: https://jamfnation.jamfsoftware.com/viewProductFile.html?fid=445
It works to move the IOBluetoothFamily.kext and IOBluetoothHIDDriver.kext files the first time. But something (possibly an Apple Update) places them back in the original location. So the script gets run again, but this time the mv command fails since it can't overwrite files in the destination. I've seen suggestions to instead use rsync with the "--remove-source-files" option, but that doesn't work for the *.kext files since OS X sees them as directories (which they really are).
Has anyone implemented a clean fix for this? If not, i was thinking of modifying the script to either rename any existing files in the destination to something like file.kext.001 or delete them with rm once rsync finishes.