Ok guys so i have been working on my drive wiper for a while now, i keep making progress and getting help. This on the other hand seems to be a nightmare. I cant for the life of me get udev remove action to work. I have no problem with the following
Code:
ACTION=="remove", KERNEL=="sdb", RUN+="/bin/udev_sdb_shred"
The remove rule seems simply just not be working correctly.
Code:
ACTION=="remove", KERNEL=="sdb", RUN+="/bin/udev_sdb_shred"
Code:
ACTION=="remove", ENV{DEVTYPE}=="disk", RUN+="/bin/udev_sdb_remove"
The idea is to put drives in the wiper and have them start wiping automatically with shred (Works great). if i come across a bad drive in the process , just pull it out.
I noticed on dmesg when i pull the drive it automatically kills /bin/udev_sdb_shred by default and times out. (This is great, but it does not kill the actual shred
process........) Just the script holding the shred process.
So i need either the remove feature of udev to be working correctly or the automatic kill feature of udev when a drive is pulled and stops responding to work.
code of /bin/udev_sdb_shred (auto killed by udev when drives no longer responses via I/O)
Code:
shred -v -f -z /dev/sdb (not autokilled - actual code of udev_sdb_shred)
Any ideas guys, i got everything working even the auto upload log to my website.
This is literally my LAST hurdle before this project is completely finished.