#!/bin/sh ##----------------------------------------------------------------------------- ## /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-2016 Linum Software GmbH ## ## Last Update: $Id$ ## ## 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_MOUNT_'$idx'_MOUNTPOINT' eval service='$CIFS_MOUNT_'$idx'_SERVICE' eval domain='$CIFS_MOUNT_'$idx'_DOMAIN' eval user='$CIFS_MOUNT_'$idx'_USER' eval password='$CIFS_MOUNT_'$idx'_PASSWORD' eval security='$CIFS_MOUNT_'$idx'_SECURITY' eval iocharset='$CIFS_MOUNT_'$idx'_IOCHARSET' eval extra_options='$CIFS_MOUNT_'$idx'_EXTRA_OPTIONS' do_modprobe -q nls_$iocharset mkdir -p "$mountpoint" cmdline="username=$user" [ -n "$domain" ] && cmdline="$cmdline,domain=$domain" [ -n "$password" ] && cmdline="$cmdline,password=$password" [ -n "$security" ] && cmdline="$cmdline,sec=$security" [ -n "$iocharset" ] && cmdline="$cmdline,iocharset=$iocharset" [ -n "$extra_options" ] && cmdline="$cmdline,$extra_options" mount.cifs //$service $mountpoint -o $cmdline done end_script fi