Embedded Linux development
 help / color / mirror / Atom feed
* Re: [ANNOUNCE] udev 125 release
       [not found] ` <20080728233224.GA27073@bongo.bofh.it>
@ 2008-07-29  1:53   ` David VomLehn
  2008-07-29  2:10     ` Marco d'Itri
  0 siblings, 1 reply; 2+ messages in thread
From: David VomLehn @ 2008-07-29  1:53 UTC (permalink / raw)
  To: Marco d'Itri; +Cc: linux-hotplug, Linux Embedded Maillist

Marco d'Itri wrote:
> On Jul 29, David VomLehn <dvomlehn@cisco.com> wrote:
> 
>> If I understand what is meant by "on-the-fly generated rules", these are 
>> not static and so don't belong under /etc. I think an FHS-conforming 
>> place for these would be under /var somewhere, such as /var/lib/udev. 
> /var may not be available yet when the files are needed, arguing to move
> them there is pointless.
> Also, they can be edited manually while /var data cannot.

I don't know of any problems with editing /var data manually, but your point 
about /var not being available early enough to run udev is certainly an important 
point to consider.

Note that embedded systems are not the only case where read-only root filesystems 
may arise. They are also used when your root filesystem is on a CDROM or DVD, or 
when you have a read-only root filesystem so you can network-mount it on multiple 
nodes. These cases influenced the Filesystem Hierarchy Standard people to make 
/etc read-only. So, I think  that using /etc for "on-the-fly" generated udev 
rules is an issue in a number of situations.

This looks like it might be a chicken-and-egg issue, where you may need to run 
udev in order to be able to mount a writable filesystem in which to store rules 
used by udev. I'm no expert on udev and what drove the need for this feature, but 
is it possible that you wouldn't need to generate rules *on-the-fly* until after 
mounting /var? If that were the case, you could still put the generated rules there.

Another possibility is simply to add a /var/lib/udev directory to the directories 
in which rules may reside. If you have a read-only root filesystem, you'll just 
have to mount /var before you can generate your own rules.




     - - - - -                              Cisco                            - - - - -         
This e-mail and any attachments may contain information which is confidential, 
proprietary, privileged or otherwise protected by law. The information is solely 
intended for the named addressee (or a person responsible for delivering it to 
the addressee). If you are not the intended recipient of this message, you are 
not authorized to read, print, retain, copy or disseminate this message or any 
part of it. If you have received this e-mail in error, please notify the sender 
immediately by return e-mail and delete it from your computer.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ANNOUNCE] udev 125 release
  2008-07-29  1:53   ` [ANNOUNCE] udev 125 release David VomLehn
@ 2008-07-29  2:10     ` Marco d'Itri
  0 siblings, 0 replies; 2+ messages in thread
From: Marco d'Itri @ 2008-07-29  2:10 UTC (permalink / raw)
  To: David VomLehn; +Cc: linux-hotplug, Linux Embedded Maillist

On Jul 29, David VomLehn <dvomlehn@cisco.com> wrote:

>> Also, they can be edited manually while /var data cannot.
> I don't know of any problems with editing /var data manually, but your 
It's one of the basic rules which have always defined /var. From FHS 2.3:

/var/lib : Variable state information

Purpose

This hierarchy holds state information pertaining to an application or the
system. State information is data that programs modify while they run, and that
pertains to one specific host. Users must never need to modify files in /var/
lib to configure a package's operation.

> Note that embedded systems are not the only case where read-only root 
> filesystems may arise. They are also used when your root filesystem is on 
> a CDROM or DVD, or when you have a read-only root filesystem so you can 
> network-mount it on multiple nodes. These cases influenced the Filesystem 
> Hierarchy Standard people to make /etc read-only. So, I think  that using 
> /etc for "on-the-fly" generated udev rules is an issue in a number of 
> situations.
Live CDs do not really need persistent status and in my experience
both these and embedded systems tend to use lots of special-purpose
hacks anyway.
The generated rules *are* a configuration file and there are endless
generated configuration files in /etc (tipically they are generated
once at install time, but on most systems the same applies to udev too).

If you have a R/O /etc an no human administrator which can edit system
files then just copy the rules files from /dev/.udev/rules.d/ to /var
and restore them at the next boot before udevtrigger is run.

> need for this feature, but is it possible that you wouldn't need to 
> generate rules *on-the-fly* until after mounting /var? If that were the 
> case, you could still put the generated rules there.
It does not matter when they are generated but when they are used,
e.g. they may be needed to NFS-mount /var.
At least on Debian systems, networking is started before even local
file systems are mounted.

-- 
ciao,
Marco

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-29  2:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <488E515D.6000309@cisco.com>
     [not found] ` <20080728233224.GA27073@bongo.bofh.it>
2008-07-29  1:53   ` [ANNOUNCE] udev 125 release David VomLehn
2008-07-29  2:10     ` Marco d'Itri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox