[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#60979: What /etc/init.d/xxx restart does?



Hello developers,

I feel it is very important every init script behave the same. However the
wording of section 10.3.2 is confusing:

   The init.d scripts should ensure that they will behave sensibly if invoked
   with start when the service is already running, or with stop when it isn't,
   and that they don't kill unfortunately-named user processes. The best way to
   achieve this is usually to use start-stop-daemon. 

What mean 'behaving sensibly' ?

I would like an array

       |running |not running|
       ----------------------
start  |        |  start    |
stop   | stop   |           |
restart| restart|           |

But what should be in the 3 empty cell?

I assume 'behaving sensibly' mean:

       |running |not running|
       ----------------------
start  | error  |  start    |
stop   | stop   |  error    |
restart| restart|  start    |

'error' means print a warning to stderr but do nothing else. 

Not that if restart is implemented as 
/etc/init.d/xxx stop 
/etc/init.d/xxx start
it must disregard te exit status of the /etc/init.d/xxx stop.

If there is a consensus on this behavior, we should add it to policy.

Cheers,

-- 
Bill. <ballombe@debian.org>

  FHS 5.3: As of the date of this release of the standard, system crash were
  not supported under Linux. 



Reply to: