I must stop writing emails when tired... On Tue, Oct 09, 2018 at 08:35:33PM +0200, Wouter Verhelst wrote: > On Tue, Oct 09, 2018 at 10:52:15AM +0200, Wouter Verhelst wrote: > > - The policy-rc.d interface could be extended to allow it to signal a > > "restart, but do not fail on error" kind of policy. This would work > > for the "we have thousands of desktops and don't care about a service > > failing to restart" kind of enviromnent. > > Wanting to investigate this a bit further, I find that, actually, such a > possibility already exists. > > According to "man invoke-rc.d", policy-rc.d can exit with exit state 106 > and provide a number of actions on stdout. These are then actions that > invoke-rc.d must try in order "until one of them succeeds". As such, a > policy-rc.d implementation written like so: > > #!/bin/sh > > if [ "$1" != ssh ]
That is, of course, a logic inversion. Whoops. > then > exit 0 For clarity, this means that whatever action was requested would be allowed; and so if things fail they will cause the init script to fail, too. > fi > echo "$2 stop" > exit 106 -- Could you people please use IRC like normal people?!? -- Amaya Rodrigo Sastre, trying to quiet down the buzz in the DebConf 2008 Hacklab