From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karel Zak Date: Mon, 08 Jun 2009 12:38:26 +0000 Subject: Re: udev rule for unmount action Message-Id: <20090608123826.GD6817@nb.net.home> List-Id: References: <200906061702.10974.chris@ilovelinux.de> In-Reply-To: <200906061702.10974.chris@ilovelinux.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Sat, Jun 06, 2009 at 06:27:26PM +0200, Marco d'Itri wrote: > On Jun 06, Christian Schmitt wrote: > > > unplug the device. Is there a way to execute a script when unmounting? I guess > > doing this on the DE level is not the best way to go. > The approved method is using inotify(2) on /proc/mounts, which is not > related to udev. /proc and inotify are not good friends, but you can use poll() / select() Karel -- Karel Zak