From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kay Sievers" Date: Thu, 02 Aug 2007 09:06:57 +0000 Subject: Re: Make rule generator switchable Message-Id: <3ae72650708020206q3dd7714ekc65fc3e766c734f3@mail.gmail.com> List-Id: References: <200707271904.51531.zzam@gentoo.org> In-Reply-To: <200707271904.51531.zzam@gentoo.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On 8/1/07, Matthias Schwarzott wrote: > On Freitag, 27. Juli 2007, Kay Sievers wrote: > > On 7/27/07, Matthias Schwarzott wrote: > > > Hi there! > > > > > > I thought about making rule generator/persistent-net user switchable. As > > > this was not possible yet, I implemented one possibility. This reads > > > udev.conf from write_(cd|net)_rules and aborts if there is: > > > persistent_cd_generator="disabled" > > > > > > Is there a better method to do this? If not, how about including this, > > > and perhaps commented out part for config file. > > > > > > #Disable generation of persistent-rules for cd devices > > > #persistent_cd_generator="disabled" > > > > > > # Disable generation of persistent-rules for network devices > > > #persistent_net_generator="disabled" > > > > Just don't install the rules then? Why would you want to run the > > scripts at all, if you don't need them? > > > Well, the problem here is: > If you unpack a basic gentoo stage you get an already installed udev. WITH the > persistent-net rules. > Should we rely on the user to remove it and always remove it again after > update. > > Or Add some install time flag to udev package - but package manager portage > will not remove the file if already existing for config-protection issues. For RPM you would just create a subpackage, which contain the rules and scripts, which the user can install or remove if needed. Btw, default udev rules are not configuration files. They are not meant to be edited by end users and expected to be replaced by every package update, so installing with a "disable flag" should probably at least rename the existing rules file do disable it. > I clain: There is no sane way to disable specific rules config-wise. > Is there no possibilities to inject some env vars into udev without calling > udevcontrol - but perhaps from udev.conf ? Create a rules file to set these values? If possible, all policy should live in the rules files itself. For the net rules, you could probably just do: SUBSYSTEM="net", NAME="%k" to disable the rules generator. Kay ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ 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