PDA

View Full Version : (v5.0.1)Start samba server: Export all drives does not work



lovetide
06-08-2006, 01:29 PM
Hi, when I start samba server, and choose YES when a dialog ask me "Export all drives so that....", but it does not export all drives.

I check the /etc/samba/smb.conf file, no additional configs is appended.

but v4.0.2 works fine.

lovetide
06-09-2006, 02:42 AM
:lol:
Okay, I found what cause this problem:

Open /usr/sbin/sambastart, goto line 86, column 45, I found the script try to find mount point contains /mnt from /etc/fstab, but, it seems both Fedora Core 5 and Knoppix 5 move the mount point to /media instead of /mnt, so of course, the script can't find any drives/mount points...



#ask user and export hardisks if he decides to do so
#can be done with append to smb.conf as its always a fresh copy
#(made above)
if $FORCEEXPORT || $DIALOG --title "$TITLE" --defaultno --yesno "$MESSAGE_EXPORTS" 0 0 ; then
for HD in $(cut -d " " -f 2 /etc/fstab|grep /mnt) ; do # change /mnt to /media
NAME=$(basename $HD)
cat >>$SMBCONF <<EOF
[$NAME]
comment = $HD
browseable = yes
path = $HD
writeable = yes
preexec = /bin/mount $HD
postexec = /bin/umount $HD
EOF
done
fi