Skip to main content
20 events
when toggle format what by license comment
Apr 2, 2019 at 18:20 history edited Vlastimil Burián CC BY-SA 4.0
grep "^${device_name} " /proc/mounts
Apr 1, 2019 at 5:37 history edited Vlastimil Burián CC BY-SA 4.0
I've found the /dev/disk/by-uuid/* is Linux-specific and so needs *BSD revision
Apr 1, 2019 at 4:29 history edited Vlastimil Burián CC BY-SA 4.0
added -n (--no-newline) argument to readlink
Apr 1, 2019 at 4:04 history edited Vlastimil Burián CC BY-SA 4.0
Full working script attached, this answer should be finally complete now
Apr 1, 2019 at 2:54 history edited Vlastimil Burián CC BY-SA 4.0
I've changed the code to read from `/proc/mounts` directly
Mar 31, 2019 at 13:34 history edited Vlastimil Burián CC BY-SA 4.0
The resulting function has been put into separate block
Mar 31, 2019 at 13:16 history edited Vlastimil Burián CC BY-SA 4.0
added 5 characters in body
Mar 31, 2019 at 13:10 history edited Vlastimil Burián CC BY-SA 4.0
mount is claimed not to be POSIX-defined either, so grepping /proc/mounts directly now
Mar 31, 2019 at 10:21 history edited Vlastimil Burián CC BY-SA 4.0
Unfortunately, the -e option has been found not to be POSIX-compliant, so out of luck there. Leaving all the information here for future reference.
Mar 31, 2019 at 9:01 history edited Vlastimil Burián CC BY-SA 4.0
code fixed
Mar 31, 2019 at 8:17 history edited Vlastimil Burián CC BY-SA 4.0
SORRY, I WILL FIX THE CODE SOON. I HOPE.
Mar 31, 2019 at 8:11 history edited Vlastimil Burián CC BY-SA 4.0
The resulting function for checking if UUID is mounted could look similar to + #!/bin/sh
Mar 31, 2019 at 7:57 history edited Vlastimil Burián CC BY-SA 4.0
added 83 characters in body
Mar 31, 2019 at 7:50 history edited Vlastimil Burián CC BY-SA 4.0
added 191 characters in body
Mar 31, 2019 at 7:42 history edited Vlastimil Burián CC BY-SA 4.0
added 138 characters in body
Mar 31, 2019 at 7:33 history edited Vlastimil Burián CC BY-SA 4.0
added 44 characters in body
Mar 31, 2019 at 5:01 history edited Vlastimil Burián CC BY-SA 4.0
added 525 characters in body
Mar 31, 2019 at 4:49 vote accept Vlastimil Burián
Mar 31, 2019 at 4:49 history edited Vlastimil Burián CC BY-SA 4.0
added 269 characters in body
Mar 31, 2019 at 4:17 history answered Fitz CC BY-SA 4.0