##----------------------------------------------------------------------------- ## /etc/rc.d/rc500.cifs 3.1.2-rev12637 ## ## P L E A S E R E A D T H E D O C U M E N T A T I O N , ## ## B I T T E U N B E D I N G T D I E D O K U M E N T A T I O N ## ## Creation: 2005-09-14 - Claas Hilbrecht ## Copyright (c) 2005 - Linum Software GmbH ## ## Last Update: $Id: rc500.smbfs 12163 2006-09-27 11:36:44Z jw5 $ ## ## 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. ##----------------------------------------------------------------------------- if [ "$OPT_CIFS" = "yes" ] then begin_script CIFS "mounting samba/windows shares..." do_modprobe cifs # [ -e /etc/smb.conf ] || echo "#" > /etc/smb.conf [ "$CIFS_MOUNT_N" -eq 0 ] || for idx in `seq 1 $CIFS_MOUNT_N` do eval mountpoint='$CIFS_'$idx'_MOUNTPOINT' eval service='$CIFS_'$idx'_SERVICE' eval user='$CIFS_'$idx'_USER' eval password='$CIFS_'$idx'_PASSWORD' eval iocharset='$CIFS_'$idx'_IOCHARSET' eval extra_options='$CIFS_'$idx'_EXTRA_OPTIONS' [ -n "$codepage" ] && do_modprobe nls_$codepage [ -n "$iocharset" ] && do_modprobe nls_$iocharset mkdir -p "$mountpoint" cmdline="username=$user" [ -n "$password" ] && cmdline="$cmdline,password=$password" [ -n "$iocharset" ] && cmdline="$cmdline,iocharset=$iocharset" [ -n "$extra_options" ] && cmdline="$cmdline,$extra_options" mount.cifs //$service $mountpoint -o $cmdline done end_script fi