1832617 Members
2840 Online
110043 Solutions
New Discussion

CIFS mount error code

 
Van Poelvoorde
Occasional Advisor

CIFS mount error code

Hi,

I use mount -F cifs ... to mount some shares on my L1000/9000 server using CIFS/9000 client 1.0.6
However whatever happens (if the mount fails or succedds) the mount command always gives a return code of 1 (so different from 0). Also when I try to mount rubbish:

mount -F cifs rubbish:rubbish /tmp/rubbish

he does mount something even if I don't have any server 'rubbish' with a share called 'rubbish' on my network.
When I look with cifslist -A I see the mount is done, bdf gives me an I/O error on the specific mount (which is normal because it is rubbish anyway).

How can I error-handle the mount command, how can I be sure that the mount doesn't continue or gives some nice error messages.
When I try using cifsmount, it works fine: he won't mount anything if he doesn't fine the server or the share. But I don't want to use cifsmount, because then I have to hard-code passwords and anyway it seems that cifs(u)mount are commands that will not be supported anymore in the futurs (cfr. manual CIFS/9000 client).

thanks for the help!