From: Matthias Schwarzott Date: Thu, 22 Mar 2007 10:03:43 +0000 Subject: Re: [PATCH] Let persistent-cd rules use by-id for usb/firewire Message-Id: <200703221103.43118.zzam@gentoo.org> MIME-Version: 1 Content-Type: multipart/mixed; boundary="Boundary-00=_/RlAG/jO/B9RySv" List-Id: References: <200703211920.50772.zzam@gentoo.org> In-Reply-To: <200703211920.50772.zzam@gentoo.org> To: linux-hotplug@vger.kernel.org --Boundary-00=_/RlAG/jO/B9RySv Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Mittwoch, 21. M=C3=A4rz 2007, Matthias Schwarzott wrote: > On Mittwoch, 21. M=C3=A4rz 2007, Kay Sievers wrote: > > On 3/21/07, Matthias Schwarzott wrote: > > > I suggest to let extras/rule_generator/75-cd-aliases-generator.rules > > > use by-id for usb/firewire devices. > > > > > > Attached patch contains a (at least for me) working solution. > > > > At the time the script runs, you already have > > ID_BUS=3D{ata,scsi,usb,ieee1394} in the environment. Shouldn't we put > > the logic, which default id-type to use in the script? > > Sounds like a good idea :) > Try this as a sample implementation. Matthias =2D-=20 Matthias Schwarzott (zzam) --Boundary-00=_/RlAG/jO/B9RySv Content-Type: text/x-diff; charset="utf-8"; name="udev-107-usbcd-by-id.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="udev-107-usbcd-by-id.patch" diff --git a/extras/rule_generator/write_cd_rules b/extras/rule_generator/write_cd_rules index 1dbe6b7..bd951c5 100644 --- a/extras/rule_generator/write_cd_rules +++ b/extras/rule_generator/write_cd_rules @@ -53,7 +53,15 @@ fi if [ "$1" ]; then METHOD="$1" else - METHOD='by-path' + case "$ID_BUS" in + usb|ieee1394) + METHOD='by-id' + ;; + + *) + METHOD='by-path' + ;; + esac fi case "$METHOD" in --Boundary-00=_/RlAG/jO/B9RySv Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV --Boundary-00=_/RlAG/jO/B9RySv Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --Boundary-00=_/RlAG/jO/B9RySv--