diff options
-rw-r--r-- | etc/Makefile | 5 | ||||
-rw-r--r-- | etc/rc | 14 | ||||
-rw-r--r-- | etc/rc.conf | 17 | ||||
-rw-r--r-- | etc/rc.d/lockd | 11 | ||||
-rw-r--r-- | etc/rc.d/mountd | 9 | ||||
-rw-r--r-- | etc/rc.d/nfsd | 21 | ||||
-rw-r--r-- | etc/rc.d/statd | 11 |
7 files changed, 69 insertions, 19 deletions
diff --git a/etc/Makefile b/etc/Makefile index a2dd7eaedc2..5fceefa551b 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.304 2011/07/08 00:50:09 robert Exp $ +# $OpenBSD: Makefile,v 1.305 2011/07/08 00:54:04 ajacoutot Exp $ TZDIR= /usr/share/zoneinfo LOCALTIME= Canada/Mountain @@ -36,7 +36,8 @@ RCDAEMONS= apmd aucat bgpd bootparamd btd cron dhcpd dhcrelay dvmrpd ftpd \ ldapd ldattach ldpd lpd mopd mrouted named nsd ntpd portmap pflogd \ rarpd rbootd relayd ripd route6d rtadvd rtsold rwhod sasyncd \ sendmail sensorsd smtpd snmpd spamd sshd syslogd watchdogd wsmoused \ - xdm ypbind ypldap yppasswdd ypserv + xdm ypbind ypldap yppasswdd ypserv kdc kadmind kpasswdd nfsd mountd \ + lockd statd MISETS= base${OSrev}.tgz comp${OSrev}.tgz \ man${OSrev}.tgz game${OSrev}.tgz etc${OSrev}.tgz @@ -1,4 +1,4 @@ -# $OpenBSD: rc,v 1.371 2011/07/08 00:51:52 deraadt Exp $ +# $OpenBSD: rc,v 1.372 2011/07/08 00:54:04 ajacoutot Exp $ # System startup script run by init on autoboot # or after single-user. @@ -416,17 +416,7 @@ start_daemon portmap [ X"`domainname`" != X"" ] && \ start_daemon ypserv ypldap ypbind yppasswdd -if [ X"${nfs_server}" = X"YES" -a -s /etc/exports -a \ - `sed -e '/^#/d' < /etc/exports | wc -l` -ne 0 ]; then - rm -f /var/db/mountdtab - echo -n > /var/db/mountdtab - echo -n ' mountd'; mountd - echo -n ' nfsd'; nfsd ${nfsd_flags} - if [ X"${lockd}" = X"YES" ]; then - echo -n ' rpc.lockd'; rpc.lockd - echo -n ' rpc.statd'; rpc.statd - fi -fi +start_daemon mountd nfsd lockd statd if [ X"${amd}" = X"YES" -a -e ${amd_master} ]; then echo -n ' amd' diff --git a/etc/rc.conf b/etc/rc.conf index 7d179b11a3d..58a202fb80d 100644 --- a/etc/rc.conf +++ b/etc/rc.conf @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: rc.conf,v 1.148 2011/07/07 23:31:09 ajacoutot Exp $ +# $OpenBSD: rc.conf,v 1.149 2011/07/08 00:54:04 ajacoutot Exp $ # set these to "NO" to turn them off. otherwise, they're used as flags ldpd_flags=NO # for normal use: "" @@ -76,8 +76,6 @@ xdm_flags=NO # for normal use: "" wsmoused_flags=NO # for ps/2 or usb mice: "", serial: "-p /dev/cua00" # set the following to "YES" to turn them on -nfs_server=NO # see sysctl.conf for nfs client configuration -lockd=NO amd=NO pf=YES # Packet filter / NAT ipsec=NO # IPsec @@ -98,7 +96,10 @@ multicast_router=NO # A multicast routing daemon will be run, e.g. mrouted savecore_flags= # "-z" to compress ypserv_flags=NO # add more flags, eg. -1 for YP v1, -d for DNS etc yppasswdd_flags=NO # "-d /etc/yp" if passwd files are in /etc/yp -nfsd_flags="-tun 4" # Crank the 4 for a busy NFS fileserver +nfsd_flags=NO # for normal use: "-tun 4" and see nfsd(8) +mountd_flags=NO # for normal use: "" +lockd_flags=NO # for normal use: "" +statd_flags=NO # for normal use: "" amd_master=/etc/amd/master # AMD 'master' map syslogd_flags= # add more flags, e.g. "-u -a /chroot/dev/log" pf_rules=/etc/pf.conf # Packet filter rules file @@ -115,7 +116,9 @@ rc_scripts= local_rcconf="/etc/rc.conf.local" -unset inetd_flags rwhod_flags portmap_flags kdc_flags kadmind_flags kpasswdd_flags btd_flags +unset inetd_flags rwhod_flags portmap_flags kdc_flags kadmind_flags +unset kpasswdd_flags btd_flags nfsd_flags mountd_flags lockd_flags +unset statd_flags [ -f ${local_rcconf} ] && . ${local_rcconf} # Do not edit this line @@ -127,3 +130,7 @@ unset inetd_flags rwhod_flags portmap_flags kdc_flags kadmind_flags kpasswdd_fla : ${kadmind_flags=$([ X"${krb5_master_kdc-NO}" = XYES ] || echo NO)} : ${kpasswdd_flags=$([ X"${krb5_master_kdc-NO}" = XYES ] || echo NO)} : ${btd_flags=$([ X"${bt-NO}" = XYES ] || echo NO)} +: ${nfsd_flags=$([ X"${nfs_server-NO}" = XYES ] && echo "-tun 4" || echo NO)} +: ${mountd_flags=$([ X"${nfs_server-NO}" = XYES ] || echo NO)} +: ${lockd_flags=$([ X"${lockd-NO}" = XYES ] || echo NO)} +: ${statd_flags=$([ X"${lockd-NO}" = XYES ] || echo NO)} diff --git a/etc/rc.d/lockd b/etc/rc.d/lockd new file mode 100644 index 00000000000..e43d4b168ad --- /dev/null +++ b/etc/rc.d/lockd @@ -0,0 +1,11 @@ +#!/bin/sh +# +# $OpenBSD: lockd,v 1.1 2011/07/08 00:54:04 ajacoutot Exp $ + +daemon="/usr/sbin/rpc.lockd" + +. /etc/rc.d/rc.subr + +rc_reload=NO + +rc_cmd $1 diff --git a/etc/rc.d/mountd b/etc/rc.d/mountd new file mode 100644 index 00000000000..220409236be --- /dev/null +++ b/etc/rc.d/mountd @@ -0,0 +1,9 @@ +#!/bin/sh +# +# $OpenBSD: mountd,v 1.1 2011/07/08 00:54:04 ajacoutot Exp $ + +daemon="/sbin/mountd" + +. /etc/rc.d/rc.subr + +rc_cmd $1 diff --git a/etc/rc.d/nfsd b/etc/rc.d/nfsd new file mode 100644 index 00000000000..7cebb40862d --- /dev/null +++ b/etc/rc.d/nfsd @@ -0,0 +1,21 @@ +#!/bin/sh +# +# $OpenBSD: nfsd,v 1.1 2011/07/08 00:54:04 ajacoutot Exp $ + +daemon="/sbin/nfsd" + +. /etc/rc.d/rc.subr + +rc_reload=NO + +rc_pre() { + [ -s /etc/exports -a `sed -e '/^#/d' < /etc/exports | wc -l` -ne 0 ] && + rm -f /var/db/mountdtab && \ + echo -n > /var/db/mountdtab +} + +rc_post() { + pkill -f "^nfsd: server$" +} + +rc_cmd $1 diff --git a/etc/rc.d/statd b/etc/rc.d/statd new file mode 100644 index 00000000000..091c840d853 --- /dev/null +++ b/etc/rc.d/statd @@ -0,0 +1,11 @@ +#!/bin/sh +# +# $OpenBSD: statd,v 1.1 2011/07/08 00:54:04 ajacoutot Exp $ + +daemon="/usr/sbin/rpc.statd" + +. /etc/rc.d/rc.subr + +rc_reload=NO + +rc_cmd $1 |