[Samba] smbget returns wrong exit code

Joerg Thuemmler listen at vordruckleitverlag.de
Sun Mar 7 23:32:26 MST 2010


Jason Schaefer schrieb:
> smbget -Rr smb://localhost/share
> 
> [all files and folders are copied successfully!]
> 
> echo $?
> 1
> 
> On the other hand, when smbget is introduced with an error
> 
> smbget -Rr smb://localhost/shar
> Can't open directory smb://localhost/shar: No such file or directory
> 
> echo $?
> 0
> 
> This is breaking my error checking in backup scripts. I can't find any
> place to file a bug report, I hope this is the right list
> 
> Thanks
> Jason

Hi,

found the same behavior using smbget with errornous parameters. Maybe it
should do so: return not the error code but the count of files it got?
Although that would be really strange...

cu jth



More information about the samba mailing list