Browse Source

add scripts for portmap and the yp daemons

OPENBSD_5_0
robert 13 years ago
parent
commit
6c0bb90640
6 changed files with 87 additions and 4 deletions
  1. +5
    -4
      src/etc/Makefile
  2. +12
    -0
      src/etc/rc.d/portmap
  3. +17
    -0
      src/etc/rc.d/ypbind
  4. +9
    -0
      src/etc/rc.d/ypldap
  5. +28
    -0
      src/etc/rc.d/yppasswdd
  6. +16
    -0
      src/etc/rc.d/ypserv

+ 5
- 4
src/etc/Makefile View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.297 2011/07/06 18:55:36 robert Exp $
# $OpenBSD: Makefile,v 1.298 2011/07/07 01:52:57 robert Exp $
TZDIR= /usr/share/zoneinfo TZDIR= /usr/share/zoneinfo
LOCALTIME= Canada/Mountain LOCALTIME= Canada/Mountain
@ -33,9 +33,10 @@ BIN2= motd
# -r-xr-xr-x # -r-xr-xr-x
RCDAEMONS= apmd bgpd bootparamd cron dhcpd dhcrelay dvmrpd ftpd ftpproxy \ RCDAEMONS= apmd bgpd bootparamd cron dhcpd dhcrelay dvmrpd ftpd ftpproxy \
hostapd hotplugd httpd identd ifstated iked inetd isakmpd ldapd \ hostapd hotplugd httpd identd ifstated iked inetd isakmpd ldapd \
ldattach ldpd lpd mopd mrouted named nsd ntpd rarpd rbootd relayd \
ripd route6d rtadvd rtsold rwhod sasyncd sendmail sensorsd smtpd \
snmpd sshd syslogd timed watchdogd
ldattach ldpd lpd mopd mrouted named nsd ntpd portmap rarpd \
rbootd relayd ripd route6d rtadvd rtsold rwhod sasyncd sendmail \
sensorsd smtpd snmpd sshd syslogd timed watchdogd ypbind ypldap \
yppasswdd ypserv
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


+ 12
- 0
src/etc/rc.d/portmap View File

@ -0,0 +1,12 @@
#!/bin/sh
#
# $OpenBSD: portmap,v 1.1 2011/07/07 01:52:58 robert Exp $
daemon="/usr/sbin/portmap"
. /etc/rc.d/rc.subr
rc_reload=NO
rc_restart=NO
rc_cmd $1

+ 17
- 0
src/etc/rc.d/ypbind View File

@ -0,0 +1,17 @@
#!/bin/sh
#
# $OpenBSD: ypbind,v 1.1 2011/07/07 01:52:58 robert Exp $
daemon="/usr/sbin/ypbind"
. /etc/rc.d/rc.subr
rc_bg=YES
rc_reload=NO
rc_pre() {
[ X`domainname` != X"" -a -d /var/yp/binding ] || \
return 1
}
rc_cmd $1

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

@ -0,0 +1,9 @@
#!/bin/sh
#
# $OpenBSD: ypldap,v 1.1 2011/07/07 01:52:58 robert Exp $
daemon="/usr/sbin/ypldap"
. /etc/rc.d/rc.subr
rc_cmd $1

+ 28
- 0
src/etc/rc.d/yppasswdd View File

@ -0,0 +1,28 @@
#!/bin/sh
#
# $OpenBSD: yppasswdd,v 1.1 2011/07/07 01:52:58 robert Exp $
daemon="/usr/sbin/rpc.yppasswdd"
. /etc/rc.d/rc.subr
rc_reload=NO
rc_pre() {
[ X`domainname` != X"" -a -d /var/yp/`domainname` ] || \
return 1
_host1=`ypwhich -m passwd 2> /dev/null`
_host2=`hostname`
if [ `grep '^lookup' /etc/resolv.conf | grep yp | wc -c` -ne 0 ]; then
_host1=`ypmatch $_host1 hosts | cut -d' ' -f2`
_host2=`ypmatch $_host2 hosts | cut -d' ' -f2 | head -1`
else
_host1=`echo $_host1 | nslookup | grep '^Name: ' | \
sed -e 's/^Name: //'`
_host2=`echo $_host2 | nslookup | grep '^Name: ' | \
sed -e 's/^Name: //'`
fi
[ "$_host2" != "$_host1" ] && return 1
}
rc_cmd $1

+ 16
- 0
src/etc/rc.d/ypserv View File

@ -0,0 +1,16 @@
#!/bin/sh
#
# $OpenBSD: ypserv,v 1.1 2011/07/07 01:52:58 robert Exp $
daemon="/usr/sbin/ypserv"
. /etc/rc.d/rc.subr
rc_reload=NO
rc_pre() {
[ X`domainname` != X"" -a -d /var/yp/`domainname` ] || \
return 1
}
rc_cmd $1

Loading…
Cancel
Save