From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Date: Thu, 21 Nov 2002 20:58:07 +0000 Subject: Re: Start and Stop Samba Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Christian Gennerat wrote: > My wish is to start Samba when the network card is inserted or when > power resumes. > And stop Samba before standby, or if the network card is removed, > as it was done by cardmgr and /etc/pcmcia/network script. Right now there are no hotplug events relating to power management, though it might be a good idea to add that capability sometime. However, events on device add/remove should work just fine. > I have added this in net.agent: > > unregister) > exec /etc/init.d/smb stop > ;; > > and got this: > Sep 5 17:06:27 bcv66vbb /etc/hotplug/pci.agent: PCI remove event not > supported Likely not to worry. > Sep 5 17:06:27 bcv66vbb smb: smbd shutdown failed > Sep 5 17:06:28 bcv66vbb smb: nmbd shutdown failed > > What is wrong ? > > For smb start, I do not see any error message, but smb is not started > > What should be the correct method ? Hmm, I'm not sure ... but shouldn't you also have added some logic to start SMB after the "ifup"? I could easily believe that shutdown failed because you never started it... - Dave ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel