1 |
On Mon, Mar 19, 2012 at 12:35:26AM +0200, Alan McKinnon wrote |
2 |
|
3 |
> > systemd is like Captain Picard of STTNG (Start Trek The Next |
4 |
> > Generation) always saying "make it so". *HOW DO YOU "MAKE IT SO"? |
5 |
> > That intelligence has to be somewhere. So what alternative do you |
6 |
> > propose? A bash or ash script is more guaranteed to run than a |
7 |
> > binary. Shoving all that "intelligence" into the service itself, |
8 |
> > means that the service has to start up in order to determine whether |
9 |
> > it's safe for the service to start up. What's wrong with this |
10 |
> > picture? |
11 |
> |
12 |
> The intelligence goes in the init system's config file for that service |
13 |
> of course. I know I didn't clearly say so, but that's where it goes. |
14 |
|
15 |
The config file can specify upper/lower limits, variables, settings, |
16 |
etc, etc. But in the end, some executable somewhere is going to have to |
17 |
parse the config file, check the actual environment, and decide whether |
18 |
or not to launch the service, and with what parameters. |
19 |
|
20 |
Note also that many open source programs are multiplatform. I.e. they |
21 |
run on FreeDOS with DJGPP, multiple flavours of Windows, multiple BSDs |
22 |
(including Apple), linux, and multiple commercial unix flavours. Do you |
23 |
really want to throw multiple platform-specific IFDEFs into the program |
24 |
code to allow the services to do the appropriate platform-specific |
25 |
initialization? Isn't it be easier to move the service setup out of the |
26 |
main service, and let the maintainers of the specific platforms figure |
27 |
it out? |
28 |
|
29 |
One last question. Let's go back in time 20 years, and assume that |
30 |
you're the maintainer for a program that runs as a service. A small |
31 |
handfull of end-users come along. They're running a "hobby OS" that |
32 |
fits on a couple floppies. Said "hobby OS" has been cobbled together by |
33 |
a university student. Would you... |
34 |
* download that university student's hobby OS, and install it |
35 |
* throw in a bunch of additional IFDEF initialization code in your program |
36 |
* test and debug the program to make sure it runs under that OS |
37 |
|
38 |
-- |
39 |
Walter Dnes <waltdnes@××××××××.org> |