PDA

Bekijk de volledige versie : FTP and SAMBA in 1.9.2.7-10



katalin
16-05-2008, 07:22
I have the following setup:
-AUSUS 500GP v1 router
-1.9.2.7-10 firmware
-1 GB USB stick mounted as /opt in fstab
-some times I plug in the other USB an external harddisk ( mounted as /tmp/harddisk)

I've checked in the web interface to use samba and ftp. When I plug in the external harddrive, everything is ok: i see the samba shares and the vsftpd is working ok. When I unplug it, samba and ftp daemons stop working anymore and I can't acess the samba shares on the stick or the ftp server.

Is there a startup script that is executed when I plug/unplug in the harddisk?

Thanks.

avberk
16-05-2008, 10:00
What happens if you umount before pulling the usb stick?

umount -l /tmp/harddisk

katalin
16-05-2008, 21:43
If I use umount, the daemons remain alive (as I want). Only if I pull out the harddisk, the daemons stop.

In syslog I found this:


May 16 23:35:03 kernel: usb.c: USB disconnect on device 01:03.2-2 address 3
May 16 23:35:03 nmbd[212]: [2008/05/16 23:35:03, 0] nmbd/nmbd.c:sig_term(65)
May 16 23:35:03 nmbd[212]: Got SIGTERM: going down...
May 16 23:35:04 USB storage: removed


Other than using the included FTP and SAMBA daemons, I want to do this too:
I use tranmission to download torrents. Because it needs syslog, and I don't want syslog to write the file on the USB flash stick, when I plug the harddisk, I want the script to copy the existing syslog file to hdd and make a symlink in the orginal place. When I unplug it, delete the symlink.