mountapp/README.smb 2002-12-03 ----------------------------------------------------------------------------- This file contains information sent to the mountapp maintainer (Steve) about using mountapp with SMB (Samba) mounts. This is completely unsupported, and probably applies only to Linux. Note: In my opinion (ljb), mountapp is the wrong tool for dealing with SMB mounts. You want to use autofs to automount network shares, be they NFS or SMB. mountappp is great for handling physically removable media, but automount is better for mounting network drives on demand. See the automount and Samba documentation for more information. ----------------------------------------------------------------------------- Date: Sat, 22 Jan 2000 10:17:31 -0800 From: Jay Wardle To: Steve Borho Subject: mount.app and SMB Steve, I've been using mount.app 2.7 for a while now. Very nice! You have added several features to the original that are very useful. I particularly like the graphical configuration. I also like the hiding of non-user mountable mounts, and the colored state indications. So, I did a little work to get SMB mounts to work for me, since my home network uses SMB for the sake of the Windows machines. Perhaps you could use this info. To get any SMB mounts in fstab to work, you have to setup a script called /sbin/mount.smb as discussed in the mount manpage. I understand that sometime in the future, SMB support will be built into the kernel. When that happens, all my notes below are moot! This is enough to let mount.app work, but not well. The mount happens, but the mount.app status doesn't show it The problem is that the original mount command finishes before the actual mount is done. I guess the kernel spawns yet another shell that runs mount.smb. My solution was to write a script that takss a mount point arg. If not an SMB mount, it just calls mount. If it is an SMB, it calls smbmount with the share-name and the mount point. A possible name for this script is unimount. Of course, then I setup this script as the mount command in the configuration tool. Another possibility would be to allow different mount commands for each of the mount points. This would be pretty flexible, save the user for having to use a silly script like mine, but would be significant work too. I'm not sure that it would be easy to make it general enough... One last thing. I think that it would be nice to have xpixmaps for network devices. I was thinking of making one with the drive somehow connected to a cable. I'm not sure if one xpixmap is enough, or if there should be different ones for different devices at the end of the cable. What do you think? Best Regards, Jay Wardle ------------------------- mymount ------------------------------------------- #!/bin/sh # script to select either normal mount command or multi-arg smbmount commmand # jay wardle - 22jan00 MOUNT="$1" if [ "$MOUNT" = "" ] then # must have a mount point argument! echo "$0 - Huh ? mount arg is NULL" exit 1 else # find entry in mount table config file FSTAB_LINE=`grep $MOUNT /etc/fstab` # look for smb in mount table, final grep returns 0 if found echo $FSTAB_LINE | grep smb > /dev/null let IS_NOT_SMB="$?" # we know what kind of mount, now do it if [ "$IS_NOT_SMB" = "1" ] then mount $MOUNT else echo "$FSTAB_LINE" | while read RMT MNT MORE do # could be several lines if mount substrings match, look for exact match [ "$MNT" = "$MOUNT" ] && smbmount $RMT $MNT -N > /dev/null done fi fi -----------------------------------------------------------------------------