Bug#686115: CanReload is set to yes unconditionally for legacy SysV services

2012-10-16 Thread Lennart Poettering
On Tue, 16.10.12 10:21, Michael Stapelberg (stapelb...@debian.org) wrote: > Hi Lennart, > > Lennart Poettering writes: > > I'd prefer if this complex check (at least the last part of it) could be > > moved into its own function, to make this easier to read. > Done. > > > We tend to write: > > >

Bug#686115: CanReload is set to yes unconditionally for legacy SysV services

2012-10-16 Thread Michael Stapelberg
Hi Lennart, Lennart Poettering writes: > I'd prefer if this complex check (at least the last part of it) could be > moved into its own function, to make this easier to read. Done. > We tend to write: > > if (...) > foo; > else > bar; Also done. I’ve attached a git format-patch

Bug#686115: CanReload is set to yes unconditionally for legacy SysV services

2012-10-15 Thread Lennart Poettering
On Mon, 15.10.12 00:33, Michael Stapelberg (stapelb...@debian.org) wrote: Heya, I am not a big fan of heuristics like this, but it does fix a valid issue and I don't see how else we could implement this. So, yeah, looks mostly good to commit. But first, please make a few changes: > +

Bug#686115: CanReload is set to yes unconditionally for legacy SysV services

2012-10-14 Thread Michael Stapelberg
Hi Michael, Michael Biebl writes: > a/ # of initscripts: 1192 (+3 symlinks) > $ find . -type f | wc -l > 1192 Slightly wrong, you are also matching non-executable files. The actual number of init scripts is 1189 as determined by $ find . -type f -perm 755 | wc -l > f/ # of Usage lines using co

Bug#686115: CanReload is set to yes unconditionally for legacy SysV services

2012-10-14 Thread Michael Biebl
On 14.10.2012 22:51, Michael Biebl wrote: > Some numbers: > a/ # of initscripts: 1192 (+3 symlinks) > $ find . -type f | wc -l > 1192 > > b/ # of initscripts with a Usage line (I additionally check for start to > limit false positives) > $ grep -vE "^\s*#.*" */*/* | grep "[Uu]sage.*start*" | wc

Bug#686115: CanReload is set to yes unconditionally for legacy SysV services

2012-10-14 Thread Michael Biebl
Hi Michael, On 14.10.2012 02:09, Michael Stapelberg wrote: > On Tue, 28 Aug 2012 20:42:52 +0200 > Michael Biebl wrote: >> We could extend that and check for the "Usage" message and set the >> Reload flag depending on wether we find a "reload" string in the help >> message. [..] > The patch chec

Bug#686115: CanReload is set to yes unconditionally for legacy SysV services

2012-10-13 Thread Michael Stapelberg
Hi, On Tue, 28 Aug 2012 20:42:52 +0200 Michael Biebl wrote: > We could extend that and check for the "Usage" message and set the > Reload flag depending on wether we find a "reload" string in the help > message. Attached you can find a patch which does that (reviewed by mbiebl). Before my patch,

Bug#686115: CanReload is set to yes unconditionally for legacy SysV services

2012-08-28 Thread Michael Biebl
Package: systemd Version: 44-4 Severity: normal For legacy SysV services, the CanReload flag is set to yes unconditionally by systemd. We ship ~1200 SysV init scripts in Debian and a quick&dirty check by grepping for the "Usage:" help message indicates that ~850 of those scripts do *not* support r