View Single Post

   
  #4 (permalink)  
Old 01-16-2008, 09:36 AM
Logan Shaw
 
Posts: n/a
Default Re: Are Services an improvement?

Dimitri Maziuk wrote:
> greek_philosophizer@hotmail.com sez:


>>Now that Solaris is migrating the init
>>scripts to "services",
>>I am wondering if they are
>>an improvement.
>>
>>UNIX originally was characterized as simple and elegant.


> If by "simple and elegant" you're referring to /etc/rc.boot script,
> then no, services are definitely not an improvement over a single
> monolithic shell script.


I agree that just a monolithic shell script is simple at first, but what
happens when you try to maintain it? What happens when you have 100
hosts and you want to disable some service on all of them? With a
single rc.boot (and rc.local), you've got a complicated text-editing
task, whereas with a system where every service is a separate shell
script (or is modular in some fashion), it's a million times easier
to automate this.

To put it more succinctly, what is the /etc/rc.boot equivalent of
"cd /etc/rc2.d && mv S74xntpd disable_S74xntpd"? The answer is that
in some special cases there is a way to easily disable a service
started by /etc/rc.boot (such as renaming its config file so it
doesn't find it), but in the general case, it's much more of a pain.

By the way, AIX has had something like this for about 10 years:
"startsrc" to start a subsystem, "stopsrc" to stop one, "lssrc"
to list them, etc. For example, "startsrc -s lpd" starts up lpd.

- Logan
Reply With Quote