Comment 4 for bug 103681

Revision history for this message
In , Bruce Allen (ballen) wrote : Re: Bug#204613: smartmontools: there should be a question asking if smartd should be started automatically during install

> > There are a few approaches that one could use for this:
> > (1) Scan hardware database (/etc/sysconfig/hwconf on Redhat, for
> > example) and use a pearl/python script to make /etc/smartd.conf

> Debian lacks a hw database at the moment. Are hot pluggable devices
> listed there too?

Interesting -- I had some email exchange with Arjan van de Ven about how
to improve the smartmontools packaging in redhat. He thought that every
major distribution has some type of hardware database engine.

I don't know if the redhat database has hot pluggable devices -- but I'll
find out.

I've been working on the internal structure of smartd quite a lot during
the past days - in particular to make all the important internal
structures dynamically allocated/deallocated. So it should make it easy
to accomodate a future where we could actually track devices as they are
added and removed without having to even restart smartd.

> > (2) Add a -o filename option to smartd. This option makes it run silently
> > in the foreground, construct a device list, probe devices (once) for SMART
> > capabilities, print device list in correct format, and then exit. We
> > could make smartd set itself an alarm and kill signal at the start so
> > that it would be guaranteed to exit after (say) 20 seconds.

> This sounds very good.

It's quite easy -- in fact documenting it is harder than writing the code.

> > Guido, if you like option 2, everything is already in place, with the
> > exception of a routine to print the output file. This is nice because it
> > keeps us from having to maintain a separate tool, and evolves in parallel
> > with smartd.

> I've put this on my TODO list but I don't think I'll find the time to
> look into this in the very near future.

Tell me if you want to do it. Or tell me if you think you'd use it -
since this may be the motive that I need to push me to add it myself!

Cheers,
 Bruce