prog/init/lm_sensors.init: reduce verbosity, MAKEDEV, usage and other minor cleanups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, Dec 07, 2004 at 10:17:20AM +0100, Jean Delvare wrote:
> > the attached patch is partly including some patching by Red Hat, which
> > are distribution independent.
> >
> > It exits early on absence of config files, or empty config files (no
> > MODULE_* entries) to avoid noise at startup of lm_sensors unconfigured
> > systems.
> 
> Sounds sane to me.
> 
> > There is also a MAKEDEV in the start command. This may be required for
> > proper udev operation.
> 
> Doesn't sound good to me. For one thing not all systems may have
> /sbin/MAKEDEV, for another what is fine for udev might not be fine for
> devfs or static /dev systems. Also, I thought that udev was totally
> dynamic so I don't understand why we would have to create the device
> files.

I've tested this and the devices do not get created. Do the i2c
modules create hotplug events for udev to pick them up? Or perhaps
there are udev rules required for i2c modules. Running sensors-detect
does creates /dev/i2c-0.

> Last, /dev/i2c* files are not needed for proper operation of the
> hardware monitoring modules, only for sensors-detect and dump tools.

It would be nicer to have the modules advertise their /dev interfaces,
so other tools can see them. Otherwise each tools would haveto
generate the /dev entries itself.

>  CONFIG=/etc/sysconfig/lm_sensors
> +[ -r "$CONFIG" ] || exit 0
> +egrep '^MODULE_' $CONFIG &>/dev/null || exit 0
> 
> Why egrep and not simply grep?

Taken over w/o much though, grep would be fine.

> I'd also suggest -q instead of &>/dev/null.

Best would be

grep '^MODULE_' $CONFIG >/dev/null 2>&1


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux