From mboxrd@z Thu Jan 1 00:00:00 1970 From: md@Linux.IT (md) Date: Wed, 01 Nov 2006 14:13:04 +0000 Subject: Re: Some changes in write-cd-rules script Message-Id: <20061101141304.GB10763@bongo.bofh.it> List-Id: References: <45410738.9040501@terra.com.br> In-Reply-To: <45410738.9040501@terra.com.br> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Oct 26, Piter PUNK wrote: > I got the following problems: Your first problem is that you do not understand the locking rules used by the script. > +if ! egrep "^ENV{ID_CDROM}=\"\?\*\", ENV{ID_PATH}=\"$ID_PATH\"" /etc/udev/rules.d/* &>/dev/null ; then > + # Prevent concurrent processes from modifying the file at the same time. > + lock_rules_file This creates a race. Also, checking all files in the directory is broken because some may not be rules files. I think that there are other problems, but I have not examined carefully the script. -- ciao, Marco ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 _______________________________________________ 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