Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 May 2014 21:39:12 +0200
From:      =?UTF-8?Q?Tomek_Wa=C5=82aszek?= <tmwalaszek@gmail.com>
To:        freebsd-ports@freebsd.org
Subject:   [net/openntpd] pidfile support
Message-ID:  <CAN3T69vFEGXmwWjwp69oJEOPx3cLKaDyxR379xGvnzaZ-_ExtA@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
--047d7b2e0b3f15bc3804fab751f7
Content-Type: text/plain; charset=UTF-8

Hello,
I was missing pid file support in OpenNTPD. I've created a patch that
enables pidfile /var/run/ntpd.pid in OpenNTPD and now I can define in the
rc script pidfile location. With pidfile location I dont see any more this
annoying message when restarting and stopping:

[root@vps24009 ~]# /usr/local/etc/rc.d/openntpd stop
Stopping openntpd.
kill: 20188: No such process
kill: 20189: No such process


And with pidfile="/var/run/ntpd.pid" in openntpd rc script

[root@vps24009 ~]# /usr/local/etc/rc.d/openntpd stop
Stopping openntpd.


Regards,
Tomasz

--047d7b2e0b3f15bc3804fab751f7
Content-Type: text/x-patch; charset=US-ASCII; name="openntpd.patch"
Content-Disposition: attachment; filename="openntpd.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_hvvbixv20

ZGlmZiAtcnVOIC91c3IvcG9ydHMvbmV0L29wZW5udHBkL3dvcmsvbnRwZC9NYWtlZmlsZSAvaG9t
ZS90bXcvQ29kZS93YXJlaG91c2Uvb3Blbm50cGRfcGlkZmlsZS9NYWtlZmlsZQotLS0gL3Vzci9w
b3J0cy9uZXQvb3Blbm50cGQvd29yay9udHBkL01ha2VmaWxlCTIwMTQtMDUtMjkgMTU6MzA6NTIu
MDAwMDAwMDAwICswMjAwCisrKyAvaG9tZS90bXcvQ29kZS93YXJlaG91c2Uvb3Blbm50cGRfcGlk
ZmlsZS9NYWtlZmlsZQkyMDE0LTA1LTMwIDEzOjA4OjI4LjAwMDAwMDAwMCArMDIwMApAQCAtMTIs
NiArMTIsNiBAQAogTUFOPQludHBkLjggbnRw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9GQUlMVVJF
LCAiRGFlbW9uIGFscmVhZHkgcnVubmluZywgcGlkOiAlZCIsCisgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgb3RoZXJwaWQpOworICAgICAgICAgICAgICAgIH0KKyAgICAg
ICAgICAgICAgICB3YXJuKCJDYW5ub3Qgb3BlbiBvciBjcmVhdGUgcGlkZmlsZSIpOworICAgICAg
ICB9CisgICAgICAgIHBpZGZpbGVfd3JpdGUocGZoKTsKKyAgICAgICAgY2hsZF9waWQgPSBudHBf
bWFpbihwaXBlX2NobGQsICZsY29uZiwgcHcsIHBmaCk7CiAJc2V0cHJvY3RpdGxlKCJbcHJpdl0i
KTsKIAlyZWFkZnJlcSgpOwogCkBAIC0xOTIsOCArMjAyLDEwIEBACiAJCQlsb2dfZGVidWcoIm5v
IHJlcGx5IHJlY2VpdmVkIGluIHRpbWUsIHNraXBwaW5nIGluaXRpYWwgIgogCQkJICAgICJ0aW1l
IHNldHRpbmciKTsKIAkJCWlmICghbGNvbmYuZGVidWcpCi0JCQkJaWYgKGRhZW1vbigxLCAwKSkK
KwkJCQlpZiAoZGFlbW9uKDEsIDApKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgcGlkZmlsZV9yZW1vdmUocGZoKTsKIAkJCQkJZmF0YWwoImRhZW1vbiIpOworICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAJCX0KIAogCQlpZiAobmZkcyA+IDAgJiYg
KHBmZFtQRkRfUElQRV0ucmV2ZW50cyAmIFBPTExPVVQpKQpAQCAtMjMxLDYgKzI0Myw3IEBACiAK
IAltc2didWZfY2xlYXIoJmlidWYtPncpOwogCWZyZWUoaWJ1Zik7CisgICAgICAgIHBpZGZpbGVf
cmVtb3ZlKHBmaCk7CiAJbG9nX2luZm8oIlRlcm1pbmF0aW5nIik7CiAJcmV0dXJuICgwKTsKIH0K
ZGlmZiAtcnVOIC91c3IvcG9ydHMvbmV0L29wZW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2QgKik7CitwaWRfdAkgbnRwX21haW4o
aW50WzJdLCBzdHJ1Y3QgbnRwZF9jb25mICosIHN0cnVjdCBwYXNzd2QgKiwgc3RydWN0IHBpZGZo
ICopOwogaW50CSBwcml2X2FkanRpbWUodm9pZCk7CiB2b2lkCSBwcml2X3NldHRpbWUoZG91Ymxl
KTsKIHZvaWQJIHByaXZfaG9zdF9kbnMoY2hhciAqLCB1X2ludDMyX3QpOwo=
--047d7b2e0b3f15bc3804fab751f7--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN3T69vFEGXmwWjwp69oJEOPx3cLKaDyxR379xGvnzaZ-_ExtA>