Right now I'm reading the code for the 'service' command. It doesn't
seem
to agree with the documentation (the man page). I figure I might as
well
try to update the man page as I go. If anyone can give me a some
answers for the following questions, I would appreciate it.
I can guess at some of the answers and eventually figure them out from
the
code, but am not confident I can explain them correctly and concisely
enough for the man page.
1. In the code and in the usage printout, there is a '-c' parameter.
What is
this for? And how does it affect the different commands.
2. What is the difference between the 'up' and 'run' service commands?
3. What does the 'restart' service command do?
4. It looks like service will also parse an 'upcopy' command, which
causes it to execute the same code as the 'up' command with a '-c'
switch, but it does not parse the remaining arguments, leaving the
corresponding variables undefined. Is this intentional?
5. The '-c' switch may be used with any command, although the
usage printout indicates it is only to be used with the 'run' and
'up'
commands. Is this intentional?
6. There is an undocumented optional '-label <label>' parameter
for the 'run' and 'up' commands . How is this used?
7. There is an undocumented optional '-config <path>' parameter
for the 'run' and 'up' commands. How is this used?
8. There is an undocumented optional '-script <path>' parameter
for the 'run' and 'up' commands. How is this used?
9. There is an undocumented optional '-printep <ignored>'
parameter for the 'run' and 'up' commands. How is this used?
Why does it require an argument which it then ignores?
10. Passing '-label', '-script', or '-config' to the 'up' command
causes it to be treated as a 'run' command. Why?
11. The 'run' command a sets up default script name. When a
'-label' or '-config' parameter is passed to the 'up' command, it
is treated as a 'run' command, except no default script is set.
Is this intentional?
12. The 'service' man page shows that 'refresh' and 'down'
take a single <pid> argument. The usage printout says they
take a label argument. Is a label the same as a <pid>?
13. What is the relationship between the <pid>/label in
the 'refresh' and 'down' service commands and the
argument.
14. Unless I'm missing something, it doesn't look like
'service' supports the 'rescue' command. It isn't in the
known_requests[] array, at least. Am I missing something?
Believe it or not, I just figured out that I have been
reading the code for MINIX 3.1.3, not 3.1.2.
Sorry about the confusion.