diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2016-10-06 20:20:42 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2016-10-06 20:20:42 +0000 |
commit | abd9572434efe0e1e43d871429e7dec68300c26d (patch) | |
tree | 252fca3821ff714d3ffbb8e2d02fd466bf10c177 | |
parent | fa91099a158fda703c37bad2566c4a94b32f95ba (diff) |
Add switchd
OK deraadt@
-rw-r--r-- | etc/Makefile | 4 | ||||
-rw-r--r-- | etc/changelist | 3 | ||||
-rw-r--r-- | etc/mail/aliases | 3 | ||||
-rw-r--r-- | etc/master.passwd | 1 | ||||
-rw-r--r-- | etc/rc | 4 | ||||
-rw-r--r-- | etc/rc.conf | 3 | ||||
-rw-r--r-- | etc/rc.d/switchd | 14 |
7 files changed, 25 insertions, 7 deletions
diff --git a/etc/Makefile b/etc/Makefile index 55349ee9a22..0a57bc7a1a5 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.439 2016/10/06 18:56:17 natano Exp $ +# $OpenBSD: Makefile,v 1.440 2016/10/06 20:20:41 reyk Exp $ TZDIR= /usr/share/zoneinfo LOCALTIME= Canada/Mountain @@ -54,7 +54,7 @@ RCDAEMONS=amd apmd bgpd bootparamd cron dhcpd dhcrelay dvmrpd eigrpd ftpd \ lpd mopd mountd mrouted nfsd npppd nsd ntpd ospf6d ospfd \ pflogd portmap radiusd rarpd rbootd rebound relayd ripd route6d \ rtadvd sasyncd sensorsd slowcgi smtpd sndiod snmpd spamd \ - spamlogd sshd statd syslogd tftpd tftpproxy unbound \ + spamlogd sshd statd switchd syslogd tftpd tftpproxy unbound \ vmd watchdogd wsmoused xdm ypbind ypldap ypserv MISETS= base${OSrev}.tgz comp${OSrev}.tgz man${OSrev}.tgz game${OSrev}.tgz diff --git a/etc/changelist b/etc/changelist index 56ffc279394..6352b9bcd1d 100644 --- a/etc/changelist +++ b/etc/changelist @@ -1,4 +1,4 @@ -# $OpenBSD: changelist,v 1.113 2016/09/26 06:51:23 ajacoutot Exp $ +# $OpenBSD: changelist,v 1.114 2016/10/06 20:20:41 reyk Exp $ # # List of files which the security script backs up and checks # for modifications. @@ -132,6 +132,7 @@ /etc/suid_profile /etc/sysctl.conf /etc/syslog.conf +/etc/switchd.conf /etc/sysmerge.ignore /etc/ttys /etc/usermgmt.conf diff --git a/etc/mail/aliases b/etc/mail/aliases index 3cb44a77da9..0d03e65a467 100644 --- a/etc/mail/aliases +++ b/etc/mail/aliases @@ -1,5 +1,5 @@ # -# $OpenBSD: aliases,v 1.59 2016/09/27 05:31:37 florian Exp $ +# $OpenBSD: aliases,v 1.60 2016/10/06 20:20:41 reyk Exp $ # # Aliases in this file will NOT be expanded in the header from # Mail, but WILL be visible over networks or from /usr/libexec/mail.local. @@ -63,6 +63,7 @@ _smtpq: /dev/null _sndio: /dev/null _snmpd: /dev/null _spamd: /dev/null +_switchd: /dev/null _syslogd: /dev/null _tcpdump: /dev/null _traceroute: /dev/null diff --git a/etc/master.passwd b/etc/master.passwd index 82aa4e968c8..3f4a17e5210 100644 --- a/etc/master.passwd +++ b/etc/master.passwd @@ -58,4 +58,5 @@ _vmd:*:107:107::0:0:VM Daemon:/var/empty:/sbin/nologin _tftp_proxy:*:108:108::0:0:tftp proxy daemon:/nonexistent:/sbin/nologin _ftp_proxy:*:109:109::0:0:ftp proxy daemon:/nonexistent:/sbin/nologin _sndiop:*:110:110::0:0:sndio privileged user:/var/empty:/sbin/nologin +_switchd:*:111:111::0:0:Switch Daemon:/var/empty:/sbin/nologin nobody:*:32767:32767::0:0:Unprivileged user:/nonexistent:/sbin/nologin @@ -1,4 +1,4 @@ -# $OpenBSD: rc,v 1.488 2016/10/06 19:32:23 reyk Exp $ +# $OpenBSD: rc,v 1.489 2016/10/06 20:20:41 reyk Exp $ # System startup script run by init on autoboot or after single-user. # Output and error are redirected to console by init, and the console is the @@ -527,7 +527,7 @@ echo 'preserving editor files.'; /usr/libexec/vi.recover run_upgrade_script sysmerge echo -n 'starting network daemons:' -start_daemon ldomd sshd snmpd ldpd ripd ospfd ospf6d bgpd ifstated +start_daemon ldomd sshd switchd snmpd ldpd ripd ospfd ospf6d bgpd ifstated start_daemon relayd dhcpd dhcrelay mrouted dvmrpd radiusd eigrpd if ifconfig lo0 inet6 >/dev/null 2>&1; then diff --git a/etc/rc.conf b/etc/rc.conf index 0c948b9a224..00619d216e1 100644 --- a/etc/rc.conf +++ b/etc/rc.conf @@ -1,4 +1,4 @@ -# $OpenBSD: rc.conf,v 1.211 2015/12/06 13:51:41 rpe Exp $ +# $OpenBSD: rc.conf,v 1.212 2016/10/06 20:20:41 reyk Exp $ # DO NOT EDIT THIS FILE!! # @@ -64,6 +64,7 @@ snmpd_flags=NO spamd_flags=NO # also see spamd_black below spamlogd_flags= # use eg. "-i interface" and see spamlogd(8) sshd_flags= +switchd_flags=NO syslogd_flags= # add more flags, e.g. "-u -a /chroot/dev/log" tftpd_flags=NO tftpproxy_flags=NO diff --git a/etc/rc.d/switchd b/etc/rc.d/switchd new file mode 100644 index 00000000000..468ec70d689 --- /dev/null +++ b/etc/rc.d/switchd @@ -0,0 +1,14 @@ +#!/bin/sh +# +# $OpenBSD: switchd,v 1.1 2016/10/06 20:20:41 reyk Exp $ + +daemon="/usr/sbin/switchd" + +. /etc/rc.d/rc.subr + +# child will not return a config loading error to the parent +rc_pre() { + ${daemon} -n ${daemon_flags} +} + +rc_cmd $1 |