On Tue, Jan 13, 2009 at 9:36 AM, Matt Sealey
But if you never use it (Avahi for example, I have no mDNS-compatible devices here) and never go to a share browser or go to print a file, it shouldn't even be loaded.. the moment I do get one of these lovely little printers or a Mac sitting here, I want to be able to use it. Having the stuff on disk is great, loading it at boot and soaking xMB of memory until that point, is wasteful.
I just had a thought. It there even a way to check for the presence of
a service and then start it under Linux? I thought D-Bus would handle
this kind of thing.. but in the end if you want to, say, make sure
daemons are loaded so you can perform discoveries and connect to
shares or printers, what do you talk to, in order to find out whether
it's running and whether it should be started?
I understand that Avahi can't exactly be killed off if you want it to
work on an mDNS environment - it has to be around so it can accept the
multicasts and then notify of device presence. But it's an example of
something large, which if you are not on this kind of network, is not
needed.
I cannot say the same for hplip or cups. On most desktop systems these
services are started (at least in 11.0 and 11.1) - on most desktop
systems the printer is connected locally so it is not like you need an
active print queue running 100% of the time to accept data. You will
know when you want to print because, something requests to print. Or
that it how it should be. As for hplip, what if you do not even own an
HP printer, scanner or fax? This is the kind of thing where printing
support should be installed, but nothing actually activated until you
first add a printer (and left disabled until you actively want to add
a printer through YaST2 - and if it IS an HP all-in-one, then by all
means start hplip!)
It is commendable for the installer to search for TV cards, ISDN/DSL
and printers, but if none are found, at the very least put the
software in a holding pattern so it needn't be supported. About things
like smartd - I can see this load on my Efika but in older SUSE (not
11.0 since it works there) the smart tools command lines say smart
support is disabled and I need to start it with "-s on" - but it never
worked. The daemon was still running though. This is not sane. I
didn't set up any LVM2 stuff yet but boot.device-mapper still runs and
I get dm-mod in my kernel. This is the sort of thing which should be
there if you ran the GUI to set it up or enabled it at any point in
the installer, but not otherwise (there is no way I can think of that
would require dm-mod to be loaded, where you did not already configure
a LVM2 etc. or not actively in the process of configuring one)
Unfortunately the rc.d dependency system only seems to work within
itself (so a service relies on other services to start), but an
application can't particularly query whether a service is started, or
stopped (except if it publishes itself in D-Bus), or make a request
for it to be started once rc.d stuff is over? I don't think SuSE
manages this at all (using traditional init) although replacements
like upstart, launchd, initng all install a small daemon which can do
service control.. I bet most of them suck.
Now I am looking at it I am really, really disappointed in the state
of affairs of Linux which has been relying on the stupid runlevel
system (which has absolutely no fine-grained service control at all)
since the dark ages and has not come out of it. While Windows only has
3 service states (Automatic, Manual and Disabled), these can be
stopped and started at any time, programmatically, through service
names which are well known to the applications that use them. On any
Linux distribution any of these "services" (let's assume they're all
in rc.d) can be stopped and started but the names change per distro..
there is no registry or namespace like mDNS or D-Bus recommends in
order to get to this stuff.
Sigh. Oh well.
--
Matt Sealey