From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bill Nottingham Date: Wed, 27 Apr 2005 16:41:14 +0000 Subject: [PATCH] fix firmware.agent for multiple sysfs mounts Message-Id: <20050427164114.GA15719@nostromo.devel.redhat.com> MIME-Version: 1 Content-Type: multipart/mixed; boundary="u3/rZRmxL6MmkK24" List-Id: To: linux-hotplug@vger.kernel.org --u3/rZRmxL6MmkK24 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Not sure when you'd normally end up with this, but someone reported it in our bugzilla. Fixes firmware.agent breaking completely if sysfs is mounted on multiple paths. Bill --u3/rZRmxL6MmkK24 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="hotplug-2004_09_23-firmwaresys.patch" --- hotplug-2004_09_23/etc/hotplug/firmware.agent.foo 2005-04-27 12:37:21.000000000 -0400 +++ hotplug-2004_09_23/etc/hotplug/firmware.agent 2005-04-27 12:37:46.000000000 -0400 @@ -23,7 +23,7 @@ FIRMWARE_DIR=/lib/firmware # mountpoint of sysfs -SYSFS=$(sed -n 's/^.* \([^ ]*\) sysfs .*$/\1/p' /proc/mounts) +SYSFS=$(awk '$3 == "sysfs" { print $2 ; nextfile }' /proc/mounts) # use /proc for 2.4 kernels if [ "$SYSFS" = "" ]; then --u3/rZRmxL6MmkK24-- ------------------------------------------------------- SF.Net email is sponsored by: Tell us your software development plans! Take this survey and enter to win a one-year sub to SourceForge.net Plus IDC's 2005 look-ahead and a copy of this survey Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix _______________________________________________ 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