Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
Hey guys, I'm trying to find a way to remove the two shares that I never use, "web_page" and "printers".
I'm have 1.07 FW with ffp running off USB. I made a script to automatically mount my usb share like this:
#!/ffp/bin/sh echo "[ USB ] comment = path = /mnt/usb valid users = read only = no guest ok = yes oplocks = no map archive = no " >> /etc/samba/smb.conf smb restart
It works great. As you can see it simply adds my extra share to smb.conf and then restarts samba. Unfortunately I don't know an easy way to automatically remove these two sections:
[ web_page ] comment = Enter Our Web Page Setting path = /mnt/web_page valid users = read only = yes guest ok = yes [printers] path = /mnt/HD_a4/.lpd guest ok = Yes printable = Yes use client driver = Yes browseable = No
Has anyone here accomplished this?
---
I know that I could simply save a copy of the whole smb.conf, edit it up, and then have my script replace it on startup. But I would rather avoid this since it would break the web config pages ability to change settings, etc.
Offline
Got it!
#!/ffp/bin/sh sed -e '/\[ web_page \]/,/^$/d' -e '/\[printers\]/,/^$/d' /etc/samba/smb.conf > /etc/samba/smb.conf.new echo "[ USB ] comment = path = /mnt/usb valid users = read only = no guest ok = yes oplocks = no map archive = no " >> /etc/samba/smb.conf.new rm /etc/samba/smb.conf mv /etc/samba/smb.conf.new /etc/samba/smb.conf sleep 2 smb restart
Offline
Another technique to accomplish the samba customization, is to store your custom smb.conf
file on your hard disk and use a startup script to copy the custom smb.conf to /etc/samba and
restart samba (no sed editing skills needed) see http://dns323.kood.org/forum/viewtopic. … 7869#p7869
Offline
Or, just edit /etc/samba/smb.default
And copy it to mtd1 and mtd2:
mount -t minix /dev/mtdblock0 /sys/mtd1
cp /etc/samba/smb.default /sys/mtd1/smb.default
sync
umount /sys/mtd1
mount -t minix /dev/mtdblock1 /sys/mtd2
cp /etc/samba/smb.default /sys/mtd2/smb.default
sync
umount /sys/mtd2
Offline
@mig: If I did that, I couldn't add or remove shares from the web interface.
@michalzxc: If I understand right, that could be a better, more permanent solution. It's also a hell of alot scarier to me. I figured my way couldn't brick my device no matter what typos I made.
Offline
neonpolaris wrote:
@mig: If I did that, I couldn't add or remove shares from the web interface.
That is correct. You have to commit to full manual customization (no web GUI) with the stored customized smb.conf technique.
I see you are trying to keep web GUI functionality and the sed script is a nice viable solution (sed is a very powerful program)
I also agree with your hesitation about writing to flash, that is a very scary technique to me.
Last edited by mig (2009-07-14 22:08:19)
Offline
Sorry to dig up an old thread, but I'm re-doing my entire ffp install (usb drive failing) and I noticed that I wasn't using exactly what I posted above anymore. Instead this:
#!/ffp/bin/sh sed -e '/\[ Volume_1 \]/,/^$/d' -e '/\[ Volume_2 \]/,/^$/d' -e '/\[ web_page \]/,/^$/d' -e '/\[printers\]/,/^$/d' /etc/samba/smb.conf > /etc/samba/smb.conf.new echo "[ HD_a2 ] comment = path = /mnt/HD_a2 valid users = read only = no guest ok = yes oplocks = no map archive = no [ HD_b2 ] comment = path = /mnt/HD_b2 valid users = read only = no guest ok = yes oplocks = no map archive = no [ USB ] comment = path = /mnt/usb valid users = read only = no guest ok = yes oplocks = no map archive = no " >> /etc/samba/smb.conf.new rm /etc/samba/smb.conf mv /etc/samba/smb.conf.new /etc/samba/smb.conf sleep 2 smb restart
This also removes/re-adds the two main shares under a different name, I had found the web interface renaming to be somewhat unreliable.
Offline