Hello,
This solution will only work if the OS is booted from the cloned drive, if it's attached as a secondary/not booting the OS from it it won't work, also I thought I few solutions how this could be done but the're all easily defeated with the drive copy. We can chat more about it, but I don't think this is what you'll want. If it's written in C instead of shell it would make it a bit harder to tamper with but still will only work if OS is booted from it, and can be disabled if the drive is first plugged as secondary and solution could be disabled before booting it the first time.