How does one recover deleted device nodes without rebooting?
I had a shell script that had an undefined variable.
The script command that failed was
Code:
umount -f -l /dev/${SOME_VARIABLE}
The variable $SOME_VARIABLE was undefined because of a typo. The infamous typo.
The script is fixed, but from an admin perspective the discovery has me wondering how to resolve a bigger problem.
Some device nodes were deleted when the script executed the broken command. In particular that caused me to hunt this down was the loss of
/dev/dvb, which resulted in the system not being able to record.
I am not a udev guru at all. I have tinkered some to no avail with
udevadm trying to recover the lost device nodes. I also tried booting to run level 1 and returning. That helps some but I notice a few other quirks. The only reliable method I have discovered is rebooting.
I do not believe mknod helps because that creates a static node.
I surfed the web with no success. Most people seem to recommend rebooting.
I would appreciate some ideas about recovering deleted device nodes.
Thanks.