On Tue, 07 Feb 2012 10:44:21 +0100, Maarten Bezemer wrote:
On Tuesday 07 February 2012 09:19:25 [email protected] wrote:
Also, you may want to only start the service once the device is
plugged
in (well after the boot sequence) ... can't think of a good example
here, but it's probably better to do the right thing with hotplug
rather
than to hack around with the startup sequence.
Automatically start samba/sharing service when an external USB disk
has been
plugged in?
And how about stopping services when an USB device has been removed.
Say I
have an exeternal harddisk plugged in, but I want to use it
(temporarely) to
transport (other) data or something. So I remove it from the router,
any file
sharing services should be stopped (ideally). Is it possible to
support this
as well?
Regards,
Maarten
Hi Maarten,
On the "stopping" front, the code actually attempts to do this, however
I'm not sure how (or if) the hotplug stuff will get called *before* the
device actually goes away. It would be easy to put together some kind of
"eject" script that would do the right thing, but there may be a better
way of achieving it.
I'll happily add "eject" unless someone comes up with a better
approach.
Regards,
Lee.
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel