#!/bin/bash # netuse. # Copyright 2002, Evan Y. Chu. # For technical information, please contact Evan Y. Chu at evanc@his.com. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA UserName=dummyuser RemoteMachine=$2 RemoteShare=$3 LocalMount=$2$3 if [ "$1" = "-m" ]; then echo "attempt to mount host="$RemoteMachine "share="$RemoteShare mkdir /mnt/$LocalMount /bin/mount -t smbfs -o username=$UserName,guest //$RemoteMachine/$RemoteShare /mnt/$LocalMount elif [ "$1" = "-u" ]; then /bin/umount /mnt/$LocalMount /bin/rmdir /mnt/$LocalMount else echo "-m : mount" echo "-u : unmount" fi