diff options
Diffstat (limited to 'packaging/Mandrake/mount.smb')
-rwxr-xr-x | packaging/Mandrake/mount.smb | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/packaging/Mandrake/mount.smb b/packaging/Mandrake/mount.smb new file mode 100755 index 00000000000..ba3cee84e0a --- /dev/null +++ b/packaging/Mandrake/mount.smb @@ -0,0 +1,34 @@ +#!/bin/sh +# +# by Bill Nottingham <notting@redhat.com> +# +# Adapted from mount.smb by Greg Galperin, MAR99 <grg@ai.mit.edu> +# + +if [ $# != 4 -o "$3" != "-o" ]; then + echo "unsupported commandline $0 $*" + exit -1 +fi + +for arg in `echo $4 | tr ',' ' '`; do + case "$arg" in + user=*) + SMBUSER="`echo $arg | cut -d '=' -f 2-`" + ;; + passwd=*) + PASSWD=`echo $arg | cut -d '=' -f 2-` + ;; + domain=*) + DOMAIN="-W `echo $arg | cut -d '=' -f 2-`" + ;; + *) + ;; + esac +done + +if [ -n "$PASSWD" ]; then + USER=$SMBUSER%$PASSWD exec smbmount "$1" $2 $DOMAIN +else + USER=$SMBUSER exec smbmount "$1" $2 $DOMAIN -N +fi +exit $? |