Browse Source

Add the nfs startup scripts.

ok robert@
OPENBSD_5_0
ajacoutot 13 years ago
parent
commit
9565a7b057
7 changed files with 69 additions and 19 deletions
  1. +3
    -2
      src/etc/Makefile
  2. +2
    -12
      src/etc/rc
  3. +12
    -5
      src/etc/rc.conf
  4. +11
    -0
      src/etc/rc.d/lockd
  5. +9
    -0
      src/etc/rc.d/mountd
  6. +21
    -0
      src/etc/rc.d/nfsd
  7. +11
    -0
      src/etc/rc.d/statd

+ 3
- 2
src/etc/Makefile View File

@ -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 TZDIR= /usr/share/zoneinfo
LOCALTIME= Canada/Mountain 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 \ ldapd ldattach ldpd lpd mopd mrouted named nsd ntpd portmap pflogd \
rarpd rbootd relayd ripd route6d rtadvd rtsold rwhod sasyncd \ rarpd rbootd relayd ripd route6d rtadvd rtsold rwhod sasyncd \
sendmail sensorsd smtpd snmpd spamd sshd syslogd watchdogd wsmoused \ 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 \ MISETS= base${OSrev}.tgz comp${OSrev}.tgz \
man${OSrev}.tgz game${OSrev}.tgz etc${OSrev}.tgz man${OSrev}.tgz game${OSrev}.tgz etc${OSrev}.tgz


+ 2
- 12
src/etc/rc View File

@ -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 # System startup script run by init on autoboot
# or after single-user. # or after single-user.
@ -416,17 +416,7 @@ start_daemon portmap
[ X"`domainname`" != X"" ] && \ [ X"`domainname`" != X"" ] && \
start_daemon ypserv ypldap ypbind yppasswdd 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 if [ X"${amd}" = X"YES" -a -e ${amd_master} ]; then
echo -n ' amd' echo -n ' amd'


+ 12
- 5
src/etc/rc.conf View File

@ -1,6 +1,6 @@
#!/bin/sh - #!/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 # set these to "NO" to turn them off. otherwise, they're used as flags
ldpd_flags=NO # for normal use: "" 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" wsmoused_flags=NO # for ps/2 or usb mice: "", serial: "-p /dev/cua00"
# set the following to "YES" to turn them on # set the following to "YES" to turn them on
nfs_server=NO # see sysctl.conf for nfs client configuration
lockd=NO
amd=NO amd=NO
pf=YES # Packet filter / NAT pf=YES # Packet filter / NAT
ipsec=NO # IPsec 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 savecore_flags= # "-z" to compress
ypserv_flags=NO # add more flags, eg. -1 for YP v1, -d for DNS etc 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 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 amd_master=/etc/amd/master # AMD 'master' map
syslogd_flags= # add more flags, e.g. "-u -a /chroot/dev/log" syslogd_flags= # add more flags, e.g. "-u -a /chroot/dev/log"
pf_rules=/etc/pf.conf # Packet filter rules file pf_rules=/etc/pf.conf # Packet filter rules file
@ -115,7 +116,9 @@ rc_scripts=
local_rcconf="/etc/rc.conf.local" 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 [ -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)} : ${kadmind_flags=$([ X"${krb5_master_kdc-NO}" = XYES ] || echo NO)}
: ${kpasswdd_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)} : ${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)}

+ 11
- 0
src/etc/rc.d/lockd View File

@ -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

+ 9
- 0
src/etc/rc.d/mountd View File

@ -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

+ 21
- 0
src/etc/rc.d/nfsd View File

@ -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

+ 11
- 0
src/etc/rc.d/statd View File

@ -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

Loading…
Cancel
Save