From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: Wrong 'pathname to specified program' for 'killproc' in some init-files!? Date: Mon, 24 Apr 2017 11:24:04 +0100 Message-ID: <1493029444.3373.26.camel@ipfire.org> In-Reply-To: <40bc5f2c-0e8f-44e1-e6f3-ff0a61b8cd07@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7356776660565865153==" List-Id: --===============7356776660565865153== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, yes indeed. But is not 100% necessary to pass the -p parameter with the PID file. I just removed that when ever it got difficult to use and did not even add that for = new scripts. But using $DEVICE is definitely wrong in the snort script. -Michael On Sun, 2017-04-23 at 19:20 +0200, Matthias Fischer wrote: > Hi, >=20 > while searching for something else I found this: >=20 > Usage for the 'killproc'-function in '/etc/init.d/'-files should be (cited): >=20 > "# Function - killproc=C2=A0=C2=A0[-p pidfile] pathname [signal] > # > # Purpose: > # > # Inputs: -p pidfile, uses the specified pidfile > #=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0pathname, pathname t= o the specified program > ..." >=20 > But in the 'init'-files for 'dhcp', 'dhcrelay' and 'rndg' there is the > PROGRAMname and in 'snort'-file '/var/run' is given. The latter leads to > an error (FAIL) if both 'green0' and 'red0' are enabled and should be > both stopped: >=20 > ... > killproc -p /var/run/dhcpd.pid /usr/sbin/dhcpd > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0^^^^^^ > ... > killproc -p /var/run/dhcrelay.pid /usr/sbin/dhcrelay > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0^^^^^^^^^ > ... > killproc -p /var/run/rngd.pid /usr/sbin/rngd > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0^^^^^ > ... > killproc -p /var/run/snort_$DEVICE.pid /var/run > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0^^^^^^^^ >=20 > IMHO, all these should be changed to "pathname to the specified program" > as cited above ('/usr/sbin'). >=20 > Can anyone please confirm? >=20 > Best, > Matthias --===============7356776660565865153== Content-Type: application/pgp-signature Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="signature.asc" MIME-Version: 1.0 LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0t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