Browse Source

Remove setproctitle() for the parent process. Because rc.d(8) uses process

titles (including flags) to distinguish between daemons, this makes it
possible to manage multiple copies of a daemon using the normal infrastructure
by symlinking rc.d scripts to a new name. ok jung@ ajacoutot@, smtpd ok gilles@
OPENBSD_5_9
sthen 8 years ago
parent
commit
4114667275
13 changed files with 13 additions and 35 deletions
  1. +1
    -3
      src/etc/rc.d/eigrpd
  2. +1
    -3
      src/etc/rc.d/httpd
  3. +1
    -3
      src/etc/rc.d/ldpd
  4. +1
    -3
      src/etc/rc.d/npppd
  5. +1
    -2
      src/etc/rc.d/ntpd
  6. +1
    -3
      src/etc/rc.d/ospf6d
  7. +1
    -3
      src/etc/rc.d/ospfd
  8. +1
    -3
      src/etc/rc.d/relayd
  9. +1
    -3
      src/etc/rc.d/ripd
  10. +1
    -2
      src/etc/rc.d/smtpd
  11. +1
    -2
      src/etc/rc.d/snmpd
  12. +1
    -3
      src/etc/rc.d/vmd
  13. +1
    -2
      src/usr.sbin/ntpd/ntpd.c

+ 1
- 3
src/etc/rc.d/eigrpd View File

@ -1,11 +1,9 @@
#!/bin/sh #!/bin/sh
# #
# $OpenBSD: eigrpd,v 1.2 2015/10/21 11:28:02 gsoares Exp $
# $OpenBSD: eigrpd,v 1.3 2016/02/02 17:51:11 sthen Exp $
daemon="/usr/sbin/eigrpd" daemon="/usr/sbin/eigrpd"
. /etc/rc.d/rc.subr . /etc/rc.d/rc.subr
pexp="eigrpd: parent.*"
rc_cmd $1 rc_cmd $1

+ 1
- 3
src/etc/rc.d/httpd View File

@ -1,13 +1,11 @@
#!/bin/sh #!/bin/sh
# #
# $OpenBSD: httpd,v 1.4 2015/12/19 13:45:12 ajacoutot Exp $
# $OpenBSD: httpd,v 1.5 2016/02/02 17:51:11 sthen Exp $
daemon="/usr/sbin/httpd" daemon="/usr/sbin/httpd"
. /etc/rc.d/rc.subr . /etc/rc.d/rc.subr
pexp="httpd: parent.*"
# child will not return a config parsing error to the parent # child will not return a config parsing error to the parent
rc_pre() { rc_pre() {
${daemon} -n ${daemon_flags} ${daemon} -n ${daemon_flags}


+ 1
- 3
src/etc/rc.d/ldpd View File

@ -1,11 +1,9 @@
#!/bin/sh #!/bin/sh
# #
# $OpenBSD: ldpd,v 1.1 2011/07/06 18:55:36 robert Exp $
# $OpenBSD: ldpd,v 1.2 2016/02/02 17:51:11 sthen Exp $
daemon="/usr/sbin/ldpd" daemon="/usr/sbin/ldpd"
. /etc/rc.d/rc.subr . /etc/rc.d/rc.subr
pexp="ldpd: parent.*"
rc_cmd $1 rc_cmd $1

+ 1
- 3
src/etc/rc.d/npppd View File

@ -1,11 +1,9 @@
#!/bin/sh #!/bin/sh
# #
# $OpenBSD: npppd,v 1.1 2012/09/20 12:51:43 yasuoka Exp $
# $OpenBSD: npppd,v 1.2 2016/02/02 17:51:11 sthen Exp $
daemon="/usr/sbin/npppd" daemon="/usr/sbin/npppd"
. /etc/rc.d/rc.subr . /etc/rc.d/rc.subr
pexp="npppd: main"
rc_cmd $1 rc_cmd $1

+ 1
- 2
src/etc/rc.d/ntpd View File

@ -1,12 +1,11 @@
#!/bin/sh #!/bin/sh
# #
# $OpenBSD: ntpd,v 1.2 2011/09/14 02:36:09 william Exp $
# $OpenBSD: ntpd,v 1.3 2016/02/02 17:51:11 sthen Exp $
daemon="/usr/sbin/ntpd" daemon="/usr/sbin/ntpd"
. /etc/rc.d/rc.subr . /etc/rc.d/rc.subr
pexp="ntpd: \[priv\]"
rc_reload=NO rc_reload=NO
rc_cmd $1 rc_cmd $1

+ 1
- 3
src/etc/rc.d/ospf6d View File

@ -1,11 +1,9 @@
#!/bin/sh #!/bin/sh
# #
# $OpenBSD: ospf6d,v 1.1 2011/07/17 00:25:58 david Exp $
# $OpenBSD: ospf6d,v 1.2 2016/02/02 17:51:11 sthen Exp $
daemon="/usr/sbin/ospf6d" daemon="/usr/sbin/ospf6d"
. /etc/rc.d/rc.subr . /etc/rc.d/rc.subr
pexp="ospf6d: parent.*"
rc_cmd $1 rc_cmd $1

+ 1
- 3
src/etc/rc.d/ospfd View File

@ -1,11 +1,9 @@
#!/bin/sh #!/bin/sh
# #
# $OpenBSD: ospfd,v 1.1 2011/07/08 22:20:07 deraadt Exp $
# $OpenBSD: ospfd,v 1.2 2016/02/02 17:51:11 sthen Exp $
daemon="/usr/sbin/ospfd" daemon="/usr/sbin/ospfd"
. /etc/rc.d/rc.subr . /etc/rc.d/rc.subr
pexp="ospfd: parent.*"
rc_cmd $1 rc_cmd $1

+ 1
- 3
src/etc/rc.d/relayd View File

@ -1,13 +1,11 @@
#!/bin/sh #!/bin/sh
# #
# $OpenBSD: relayd,v 1.2 2015/12/19 13:45:12 ajacoutot Exp $
# $OpenBSD: relayd,v 1.3 2016/02/02 17:51:11 sthen Exp $
daemon="/usr/sbin/relayd" daemon="/usr/sbin/relayd"
. /etc/rc.d/rc.subr . /etc/rc.d/rc.subr
pexp="relayd: parent.*"
# child will not return a config parsing error to the parent # child will not return a config parsing error to the parent
rc_pre() { rc_pre() {
${daemon} -n ${daemon_flags} ${daemon} -n ${daemon_flags}


+ 1
- 3
src/etc/rc.d/ripd View File

@ -1,11 +1,9 @@
#!/bin/sh #!/bin/sh
# #
# $OpenBSD: ripd,v 1.1 2011/07/06 18:55:36 robert Exp $
# $OpenBSD: ripd,v 1.2 2016/02/02 17:51:11 sthen Exp $
daemon="/usr/sbin/ripd" daemon="/usr/sbin/ripd"
. /etc/rc.d/rc.subr . /etc/rc.d/rc.subr
pexp="ripd: parent.*"
rc_cmd $1 rc_cmd $1

+ 1
- 2
src/etc/rc.d/smtpd View File

@ -1,12 +1,11 @@
#!/bin/sh #!/bin/sh
# #
# $OpenBSD: smtpd,v 1.5 2015/12/26 09:55:15 ajacoutot Exp $
# $OpenBSD: smtpd,v 1.6 2016/02/02 17:51:11 sthen Exp $
daemon="/usr/sbin/smtpd" daemon="/usr/sbin/smtpd"
. /etc/rc.d/rc.subr . /etc/rc.d/rc.subr
pexp="smtpd: \[priv\]"
rc_reload=NO rc_reload=NO
rc_cmd $1 rc_cmd $1

+ 1
- 2
src/etc/rc.d/snmpd View File

@ -1,12 +1,11 @@
#!/bin/sh #!/bin/sh
# #
# $OpenBSD: snmpd,v 1.2 2014/08/25 12:08:55 halex Exp $
# $OpenBSD: snmpd,v 1.3 2016/02/02 17:51:11 sthen Exp $
daemon="/usr/sbin/snmpd" daemon="/usr/sbin/snmpd"
. /etc/rc.d/rc.subr . /etc/rc.d/rc.subr
pexp="snmpd: parent.*"
rc_reload=NO rc_reload=NO
rc_cmd $1 rc_cmd $1

+ 1
- 3
src/etc/rc.d/vmd View File

@ -1,13 +1,11 @@
#!/bin/sh #!/bin/sh
# #
# $OpenBSD: vmd,v 1.3 2015/12/19 13:45:12 ajacoutot Exp $
# $OpenBSD: vmd,v 1.4 2016/02/02 17:51:11 sthen Exp $
daemon="/usr/sbin/vmd" daemon="/usr/sbin/vmd"
. /etc/rc.d/rc.subr . /etc/rc.d/rc.subr
pexp="vmd: parent.*"
# child will not return a config parsing error to the parent # child will not return a config parsing error to the parent
rc_pre() { rc_pre() {
${daemon} -n ${daemon_flags} ${daemon} -n ${daemon_flags}


+ 1
- 2
src/usr.sbin/ntpd/ntpd.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: ntpd.c,v 1.105 2016/01/27 21:48:34 reyk Exp $ */
/* $OpenBSD: ntpd.c,v 1.106 2016/02/02 17:51:11 sthen Exp $ */
/* /*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -210,7 +210,6 @@ main(int argc, char *argv[])
/* fork child process */ /* fork child process */
chld_pid = ntp_main(pipe_chld, fd_ctl, &lconf, pw); chld_pid = ntp_main(pipe_chld, fd_ctl, &lconf, pw);
setproctitle("[priv]");
log_procinit("[priv]"); log_procinit("[priv]");
readfreq(); readfreq();


Loading…
Cancel
Save