mdev with hda's
dhenderson at digital-pipe.com
Wed May 11 15:34:08 UTC 2011
On 05/11/2011 10:56 AM, Harald Becker wrote:
> Hallo David!
>> I agree. Plus, as the previous reply stated, some of the values to
>> the more robust environment output can be included as it's already
>> used by mdev just to be able to create the device files (and other
>> values can be determined based on rule matching or further processing).
> Which environment variables do you really need? Give a complete list,
> busybox mailing list
> busybox at busybox.net
Ok, the below list is what's generated by an sda attached device:
Of those, some can be eliminated because they are available via 'env'
from an external script call, including: PATH, PWD, SHLVL, and HOME.
This leaves just the following that should actually be related to mdev:
Of those, you can actually merge DEVNAME and MDEV into one variable
since they always contain the exact same information. I also, don't
think anyone would have a use for the _ variable as that information can
be obtained easily elsewhere (e.g. 'which env'). This now leaves:
MDEV or DEVNAME=sde
At this point, we've reduce the number of actual/usable mdev environment
variables from 14 to 8! Everyone one of the variables used below is
used to perform indepth configuration of an attached device (with the
exception of SEQNUM as I have no idea what that is). These remaining
variables should be able to be passed as a standard set of variables to
any storage device whether it's passed by the kernel thread or logical
deduction. I'll include a note beside each one below:
SUBSYSTEM - already part of the mdev environment
MDEV or DEVNAME - already part of the mdev environment
DEVTYPE - this could be figured about by the rule matching (h|s)da
devices or some other easily accessible piece of info
DEVPATH - this is part of sysfs (that's currently not parsed by mdev)
and should be provided for indepth information retrieval on the device
from within a script
MINOR - used by mdev (to setup /dev/? files) already irregardless of
(h|s)da devices when not calling a script. Why is this not passed when
a script is used?
ACTION - useful by a script to know whether to add device related files
or fs cleanup. This is only one of two possible values that can easily
MAJOR - see MINOR
SEQNUM - no idea what this is; possibly remove?
More information about the busybox