-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On linux, name disks by ID #106
base: master
Are you sure you want to change the base?
Conversation
On linux, name disks by /dev/disk/by-id/xxx instead of /dev/xxx, since the latter may change after a reboot.
Thank you for this! Exactly what I needed, constant change of the name is a very annoying issue. |
If my understanding of regex is correct, Cheers
EDIT: |
I've tested it with a different regex, to also incorporate SCSI devices, a friend of mine made the regex, just replace it with: Cheers
|
The code is/was if ($devlink =~ /^ata-/) { This can easily be replaced with if ($devlink =~ /^(ata|scsi)-/) { Don't know why you'd want ?: in front of that, or escaping -, it's a perfectly valid character in regex unless it's in [] |
I don't know that much about regex, I asked a friend of mine (perl dev with a lot of knowledge about regex) who gave me that regex, and it works after testing it. btw. there are USB Harddrives with functional S.M.A.R.T, like the WD My Passport series. They identify as for example: Cheers
|
Sure - all we're waiting for is a pull… |
@rkarlsba Can you implement the proposed change (/^(?:ata-|scsi-|usb-)/) in this pull request with another commit? |
Allow for scsi and usb things as well
I beleive that should do |
On linux, name disks by /dev/disk/by-id/xxx instead of /dev/xxx, since the latter may change after a reboot.