#!/bin/sh

MOUNT_PATH="$1"
MOUNT_NAME="$2"
SAMBA_FILE=/etc/smb.conf
SHARE_NAME="$2"

if [ "$MOUNT_NAME" = "SDCard" ]; then
	SHARE_NAME=SD_Card
elif [ "$MOUNT_NAME" = "USBDisk" ]; then
	SHARE_NAME=USB_Device
fi

echo "[$SHARE_NAME]
path = $MOUNT_PATH
guest ok = yes
oplocks = no
browseable = yes
writable = yes
create mask = 0664
directory mask = 0775
" >> $SAMBA_FILE

