Weird effect of mount command in F23

Ed Greshko ed.greshko at greshko.com
Tue Oct 20 12:30:23 UTC 2015


On 10/20/2015 08:21 PM, Joachim Backes wrote:
> Then how to check in a bash script when a CD is really mounted?

Check the return code of the mount command?

[root at meimei ~]# mount /dev/sr0 /mnt
mount: no medium found on /dev/sr0
[root at meimei ~]# echo $?
32

[root at meimei ~]# mount /dev/sr0 /mnt
mount: /dev/sr0 is write-protected, mounting read-only
[root at meimei ~]# echo $?
0


-- 
In reality, some people should stick to running Windows and others should stay away from computers altogether.


More information about the test mailing list