summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-freebsd/freebsd-usbin/files')
-rw-r--r--sys-freebsd/freebsd-usbin/files/freebsd-usbin-6.0-fixmakefiles.patch24
-rw-r--r--sys-freebsd/freebsd-usbin/files/freebsd-usbin-6.1-gcc41.patch18
-rw-r--r--sys-freebsd/freebsd-usbin/files/freebsd-usbin-6.1-nowrap.patch48
-rw-r--r--sys-freebsd/freebsd-usbin/files/freebsd-usbin-6.2_rc2-libedit-netbsd.patch13
-rw-r--r--sys-freebsd/freebsd-usbin/files/freebsd-usbin-7.0-nowrap.patch45
-rw-r--r--sys-freebsd/freebsd-usbin/files/freebsd-usbin-adduser.patch20
-rw-r--r--sys-freebsd/freebsd-usbin/files/moused.confd20
-rw-r--r--sys-freebsd/freebsd-usbin/files/moused.initd66
-rw-r--r--sys-freebsd/freebsd-usbin/files/nfs.confd24
-rwxr-xr-xsys-freebsd/freebsd-usbin/files/nfs.initd209
-rwxr-xr-xsys-freebsd/freebsd-usbin/files/nfsmount.initd63
-rw-r--r--sys-freebsd/freebsd-usbin/files/powerd.confd14
-rwxr-xr-xsys-freebsd/freebsd-usbin/files/powerd.initd27
-rw-r--r--sys-freebsd/freebsd-usbin/files/pw.conf5
-rw-r--r--sys-freebsd/freebsd-usbin/files/rarpd.confd7
-rw-r--r--sys-freebsd/freebsd-usbin/files/rarpd.initd35
-rwxr-xr-xsys-freebsd/freebsd-usbin/files/rpcbind.initd30
-rw-r--r--sys-freebsd/freebsd-usbin/files/syscons.confd14
-rwxr-xr-xsys-freebsd/freebsd-usbin/files/syscons.initd78
-rwxr-xr-xsys-freebsd/freebsd-usbin/files/syslogd.initd25
20 files changed, 785 insertions, 0 deletions
diff --git a/sys-freebsd/freebsd-usbin/files/freebsd-usbin-6.0-fixmakefiles.patch b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-6.0-fixmakefiles.patch
new file mode 100644
index 0000000..1b1af6d
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-6.0-fixmakefiles.patch
@@ -0,0 +1,24 @@
+Index: usr.sbin/pcvt/Misc/Doc/Makefile
+===================================================================
+--- usr.sbin/pcvt/Misc/Doc/Makefile.orig
++++ usr.sbin/pcvt/Misc/Doc/Makefile
+@@ -4,6 +4,6 @@ NO_OBJ=
+ FILES= Acknowledgements Bibliography CharGen \
+ Charsets EscapeSequences Keyboard.HP Keyboard.VT \
+ NotesAndHints
+-FILESDIR= ${BINDIR}/Doc
++FILESDIR= ${DOCDIR}/Doc
+
+ .include <bsd.prog.mk>
+Index: usr.sbin/pcvt/Misc/Makefile
+===================================================================
+--- usr.sbin/pcvt/Misc/Makefile.orig
++++ usr.sbin/pcvt/Misc/Makefile
+@@ -2,6 +2,7 @@
+
+ NO_OBJ=
+ FILES= README.FIRST
++FILESDIR= ${DOCDIR}/pcvt
+ SUBDIR= Doc Etc
+
+ .include "Makefile.inc"
diff --git a/sys-freebsd/freebsd-usbin/files/freebsd-usbin-6.1-gcc41.patch b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-6.1-gcc41.patch
new file mode 100644
index 0000000..fc48b18
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-6.1-gcc41.patch
@@ -0,0 +1,18 @@
+Index: fbsd-6.1/usr.sbin/IPXrouted/trace.c
+===================================================================
+--- fbsd-6.1.orig/usr.sbin/IPXrouted/trace.c
++++ fbsd-6.1/usr.sbin/IPXrouted/trace.c
+@@ -66,12 +66,12 @@ int tracing = 0;
+
+ void dumpif(FILE *fd, struct interface *ifp);
+ void dumptrace(FILE *fd, char *dir, struct ifdebug *ifd);
++static int iftraceinit();
+
+ void
+ traceinit(ifp)
+ register struct interface *ifp;
+ {
+- static int iftraceinit();
+
+ if (iftraceinit(ifp, &ifp->int_input) &&
+ iftraceinit(ifp, &ifp->int_output))
diff --git a/sys-freebsd/freebsd-usbin/files/freebsd-usbin-6.1-nowrap.patch b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-6.1-nowrap.patch
new file mode 100644
index 0000000..175b0c8
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-6.1-nowrap.patch
@@ -0,0 +1,48 @@
+diff -ur usr.sbin.orig/rpcbind/Makefile usr.sbin/rpcbind/Makefile
+--- usr.sbin.orig/rpcbind/Makefile 2006-03-15 07:44:28 +0000
++++ usr.sbin/rpcbind/Makefile 2006-04-19 17:37:18 +0000
+@@ -13,13 +13,19 @@
+ rpcb_svc.c rpcb_svc_com.c security.c warmstart.c util.c \
+ rpc_generic.c
+
+-CFLAGS+= -I${LIBCRPCDIR} -I${LIBCINCLUDE} -DPORTMAP -DLIBWRAP
++CFLAGS+= -I${LIBCRPCDIR} -I${LIBCINCLUDE} -DPORTMAP
++
++DPADD= ${LIBUTIL}
++LDADD= -lutil
++
++.if !defined(NO_WRAP)
++CFLAGS+= -DLIBWRAP
++DPADD+= ${LIBWRAP}
++LDADD+= -lwrap
++.endif
+
+ .if !defined(NO_INET6)
+ CFLAGS+= -DINET6
+ .endif
+
+-DPADD= ${LIBWRAP} ${LIBUTIL}
+-LDADD= -lwrap -lutil
+-
+ .include <bsd.prog.mk>
+diff -ur usr.sbin.orig/ypserv/Makefile usr.sbin/ypserv/Makefile
+--- usr.sbin.orig/ypserv/Makefile 2004-10-18 21:42:15 +0000
++++ usr.sbin/ypserv/Makefile 2006-04-19 17:31:23 +0000
+@@ -8,10 +8,13 @@
+ SRCS= yp_svc.c yp_server.c yp_dblookup.c yp_dnslookup.c \
+ ypxfr_clnt.c yp.h yp_main.c yp_error.c yp_access.c yp_svc_udp.c
+
+-CFLAGS+= -DDB_CACHE -DTCP_WRAPPER -I.
++CFLAGS+= -DDB_CACHE -I.
+
+-DPADD= ${LIBWRAP}
+-LDADD= -lwrap
++.if !defined(NO_WRAP)
++CFLAGS+= -DTCP_WRAPPER
++DPADD+= ${LIBWRAP}
++LDADD+= -lwrap
++.endif
+
+ CLEANFILES= yp_svc.c ypxfr_clnt.c yp.h
+
+Only in usr.sbin/ypserv: Makefile.orig
diff --git a/sys-freebsd/freebsd-usbin/files/freebsd-usbin-6.2_rc2-libedit-netbsd.patch b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-6.2_rc2-libedit-netbsd.patch
new file mode 100644
index 0000000..fe8a807
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-6.2_rc2-libedit-netbsd.patch
@@ -0,0 +1,13 @@
+Index: fbsd-6.2rc2/usr.sbin/cdcontrol/cdcontrol.c
+===================================================================
+--- fbsd-6.2rc2.orig/usr.sbin/cdcontrol/cdcontrol.c
++++ fbsd-6.2rc2/usr.sbin/cdcontrol/cdcontrol.c
+@@ -1130,7 +1130,7 @@ input (int *cmd)
+ el = el_init("cdcontrol", stdin, stdout,
+ stderr);
+ hist = history_init();
+- history(hist, &he, H_EVENT, 100);
++ history(hist, &he, H_SETSIZE, 100);
+ el_set(el, EL_HIST, history, hist);
+ el_set(el, EL_EDITOR, "emacs");
+ el_set(el, EL_PROMPT, cdcontrol_prompt);
diff --git a/sys-freebsd/freebsd-usbin/files/freebsd-usbin-7.0-nowrap.patch b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-7.0-nowrap.patch
new file mode 100644
index 0000000..17442ee
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-7.0-nowrap.patch
@@ -0,0 +1,45 @@
+diff -ur usr.sbin.orig/rpcbind/Makefile usr.sbin/rpcbind/Makefile
+--- usr.sbin.orig/rpcbind/Makefile 2007-04-21 12:02:30 +0000
++++ usr.sbin/rpcbind/Makefile 2007-04-21 12:05:32 +0000
+@@ -8,13 +8,20 @@
+ SRCS= check_bound.c rpcb_stat.c rpcb_svc_4.c rpcbind.c pmap_svc.c \
+ rpcb_svc.c rpcb_svc_com.c security.c warmstart.c util.c
+
+-CFLAGS+= -DPORTMAP -DLIBWRAP
++CFLAGS+= -DPORTMAP
+
+ .if ${MK_INET6_SUPPORT} != "no"
+ CFLAGS+= -DINET6
+ .endif
+
+-DPADD= ${LIBWRAP} ${LIBUTIL}
+-LDADD= -lwrap -lutil
++DPADD= ${LIBUTIL}
++LDADD= -lutil
++
++.if !defined(NO_WRAP)
++CFLAGS+= -DTCP_WRAPPER
++DPADD+= ${LIBWRAP}
++LDADD+= -lwrap
++.endif
++
+
+ .include <bsd.prog.mk>
+diff -ur usr.sbin.orig/ypserv/Makefile usr.sbin/ypserv/Makefile
+--- usr.sbin.orig/ypserv/Makefile 2007-04-21 12:02:31 +0000
++++ usr.sbin/ypserv/Makefile 2007-04-21 12:06:53 +0000
+@@ -8,10 +8,13 @@
+ SRCS= yp_svc.c yp_server.c yp_dblookup.c yp_dnslookup.c \
+ ypxfr_clnt.c yp.h yp_main.c yp_error.c yp_access.c yp_svc_udp.c
+
+-CFLAGS+= -DDB_CACHE -DTCP_WRAPPER -I.
++CFLAGS+= -DDB_CACHE -I.
+
++.if !defined(NO_WRAP)
++CFLAGS+= -DTCP_WRAPPER
+ DPADD= ${LIBWRAP}
+ LDADD= -lwrap
++.endif
+
+ CLEANFILES= yp_svc.c ypxfr_clnt.c yp.h
+
diff --git a/sys-freebsd/freebsd-usbin/files/freebsd-usbin-adduser.patch b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-adduser.patch
new file mode 100644
index 0000000..39177b4
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-adduser.patch
@@ -0,0 +1,20 @@
+--- usr.sbin/adduser/adduser.sh.old 2006-10-01 13:41:16 +0000
++++ usr.sbin/adduser/adduser.sh 2006-10-01 13:41:38 +0000
+@@ -809,7 +809,7 @@
+ NOHOME="/nonexistent"
+ NOLOGIN="nologin"
+ NOLOGIN_PATH="/usr/sbin/nologin"
+-GREPCMD="/usr/bin/grep"
++GREPCMD="/bin/grep"
+ DATECMD="/bin/date"
+
+ # Set default values
+@@ -823,7 +823,7 @@
+ uhome=
+ upass=
+ ushell=
+-udotdir=/usr/share/skel
++udotdir=/etc/skel
+ ugroups=
+ uexpire=
+ upwexpire=
diff --git a/sys-freebsd/freebsd-usbin/files/moused.confd b/sys-freebsd/freebsd-usbin/files/moused.confd
new file mode 100644
index 0000000..fea968b
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/moused.confd
@@ -0,0 +1,20 @@
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/moused.confd,v 1.2 2006/10/03 14:43:39 uberlord Exp $
+
+# See the moused man page for available settings.
+
+# Set to your mouse device psm[0-9] for PS/2 ports, ums[0-9] for USB ports
+# Leave blank to try to autodetect it
+MOUSED_DEVICE=""
+
+# Any additional flags requires
+MOUSED_FLAGS=""
+
+# If 0xd0-0xd3 default range is occupied in your language code table, specify
+# alternative range start like MOUSECHAR_START="3", see vidcontrol(1)
+MOUSECHAR_START=""
+
+# You can also multiplex the init script for each device like so
+# ln -s moused /etc/init.d/moused.ums0
+# This enables you to have a config file per mouse (forces MOUSED_DEVICE
+# to ums0 in this case) and control each mouse.
+# devd can also start and stop these mice, which laptop users will find handy.
diff --git a/sys-freebsd/freebsd-usbin/files/moused.initd b/sys-freebsd/freebsd-usbin/files/moused.initd
new file mode 100644
index 0000000..3ac9a34
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/moused.initd
@@ -0,0 +1,66 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/moused.initd,v 1.3 2007/02/23 14:03:08 uberlord Exp $
+
+MOUSED_NAME=${SVCNAME##*.}
+if [ -n "${MOUSED_NAME}" ] && [ ${MOUSED_NAME} != "moused" ] ; then
+ MOUSED_DEVICE=/dev/"${MOUSED_NAME}"
+ MOUSED_PIDFILE=/var/run/moused-"${MOUSED_NAME}".pid
+else
+ MOUSED_NAME=
+ MOUSED_PIDFILE=/var/run/moused.pid
+fi
+
+depend() {
+ need localmount
+}
+
+start() {
+ ebegin "Starting the Console Mouse Daemon" "${MOUSED_NAME}"
+
+ if [ -z ${MOUSED_DEVICE} ] ; then
+ for x in /dev/psm[0-9]* /dev/ums[0-9]* ; do
+ if [ -e "${x}" ] && \
+ [ ! -e /var/run/moused-$(basename "${x}").pid ] ; then
+ MOUSED_DEVICE=${x}
+ eindent
+ einfo "Using mouse on ${MOUSED_DEVICE}"
+ eoutdent
+ break
+ fi
+ done
+ fi
+
+ if [ -z "${MOUSED_DEVICE}" ] ; then
+ eend 1 "No device specified in" "/etc/conf.d/${SVCNAME}" \
+ "and no mouse detected"
+ return 1
+ fi
+
+ local opts="${MOUSED_FLAGS} -p ${MOUSED_DEVICE}"
+ start-stop-daemon --start --quiet --exec /usr/sbin/moused \
+ --pidfile "${MOUSED_PIDFILE}" \
+ -- ${opts} -I "${MOUSED_PIDFILE}"
+ local retval=$?
+
+ [ -n "${MOUSE_CHAR_START}" ] && MOUSE_CHAR_START="-M ${MOUSE_CHAR_START}"
+ local ttyv=
+ for ttyv in /dev/ttyv* ; do
+ vidcontrol < "${ttyv}" ${MOUSE_CHAR_START} -m on || retval=1
+ done
+
+ eend ${retval} "Failed to start moused"
+}
+
+stop() {
+ ebegin "Stopping the Console Mouse Daemon" "${MOUSED_NAME}"
+ # Don't specify the binary as >1 instance of moused may be running
+ # which is perfectly valid as we can be multiplexed.
+ start-stop-daemon --stop --exec /usr/sbin/moused \
+ --pidfile "${MOUSED_PIDFILE}"
+ eend $? "Failed to stop moused"
+}
+
+# vim: set ts=4 :
+
diff --git a/sys-freebsd/freebsd-usbin/files/nfs.confd b/sys-freebsd/freebsd-usbin/files/nfs.confd
new file mode 100644
index 0000000..80ace9c
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/nfs.confd
@@ -0,0 +1,24 @@
+# /etc/conf.d/nfs
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/nfs.confd,v 1.1 2006/04/01 16:43:51 flameeyes Exp $
+
+# Config file for /etc/init.d/nfs
+
+# If you wish to set the port numbers for lockd,
+# please see /etc/sysctl.conf
+
+# Number of servers to be started up by default
+RPCNFSDCOUNT=8
+
+# Options to pass to rpc.mountd
+# ex. RPCMOUNTDOPTS="-p 32767
+RPCMOUNTDOPTS=""
+
+# Options to pass to rpc.statd
+# ex. RPCSTATDOPTS="-p 32765 -o 32766"
+RPCSTATDOPTS=""
+
+# Options to pass to rpc.idmapd
+RPCIDMAPDOPTS=""
+
+# Timeout (in seconds) for exportfs
+EXPORTFSTIMEOUT=30
diff --git a/sys-freebsd/freebsd-usbin/files/nfs.initd b/sys-freebsd/freebsd-usbin/files/nfs.initd
new file mode 100755
index 0000000..d99017f
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/nfs.initd
@@ -0,0 +1,209 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/nfs.initd,v 1.2 2007/04/06 14:47:17 uberlord Exp $
+
+#---------------------------------------------------------------------------
+# This script starts/stops the following
+# rpc.statd if necessary (also checked by init.d/nfsmount)
+# rpc.rquotad if exists (from quota package)
+# rpc.nfsd
+# rpc.mountd
+#---------------------------------------------------------------------------
+
+# NB: Config is in /etc/conf.d/nfs
+
+opts="reload"
+
+# This variable is used for controlling whether or not to run exportfs -ua;
+# see stop() for more information
+restarting=no
+
+# The binary locations
+exportfs=/usr/sbin/exportfs
+statd=/usr/sbin/rpc.statd
+idmapd=/usr/sbin/rpc.idmapd
+rquotad=/usr/sbin/rpc.rquotad
+nfsd=/usr/sbin/rpc.nfsd
+mountd=/usr/sbin/rpc.mountd
+
+depend() {
+ use ypbind net
+ need rpcbind
+ after quota
+}
+
+start_idmapd() {
+ [ ! -x "${idmapd}" ] && return 0
+
+ if grep -q rpc_pipefs /proc/filesystems ; then
+ if ! grep -q "rpc_pipefs /var/lib/nfs/rpc_pipefs" /proc/mounts ; then
+ [ ! -d /var/lib/nfs/rpc_pipefs ] && mkdir -p /var/lib/nfs/rpc_pipefs
+ ebegin "Mounting RPC pipefs"
+ mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
+ eend $?
+ fi
+ fi
+
+ ebegin "Starting idmapd"
+ ${idmapd} ${RPCIDMAPDOPTS}
+ eend $?
+}
+
+stop_idmapd() {
+ [ ! -x ${idmapd} ] && return 0
+
+ ebegin "Stopping idmapd"
+ start-stop-daemon --stop --quiet --exec ${idmapd}
+ ret=$?
+ eend ${ret}
+
+ if [ $restarting = "no" -a "${RC_CMD}" != "restart" ] ; then
+ if grep -q "rpc_pipefs /var/lib/nfs/rpc_pipefs" /proc/mounts ; then
+ ebegin "Unmounting RPC pipefs"
+ umount /var/lib/nfs/rpc_pipefs
+ eend $?
+ fi
+ fi
+
+ return ${ret}
+}
+
+start_statd() {
+ # Don't start rpc.statd if already started by init.d/nfsmount
+ killall -0 rpc.statd 2>/dev/null && return 0
+ ebegin "Starting NFS statd"
+ start-stop-daemon --start --quiet --exec \
+ $statd -- $RPCSTATDOPTS 1>&2
+ eend $? "Error starting NFS statd"
+}
+
+stop_statd() {
+ # Don't stop rpc.statd if it's in use by init.d/nfsmount.
+ mount -t nfs | grep -q . && return 0
+ # Make sure it's actually running
+ killall -0 rpc.statd 2>/dev/null || return 0
+ # Okay, all tests passed, stop rpc.statd
+ ebegin "Stopping NFS statd"
+ start-stop-daemon --stop --quiet --exec $statd 1>&2
+ eend $? "Error stopping NFS statd"
+}
+
+waitfor_exportfs() {
+ local pid=$1
+ ( sleep ${EXPORTFSTIMEOUT:-30}; kill -9 $pid 2>/dev/null ) &
+ wait $1
+}
+
+start() {
+ # Make sure nfs support is loaded in the kernel #64709
+ if [ -e /proc/modules ] ; then
+ modprobe nfsd &> /dev/null
+ fi
+
+ # This is the new "kernel 2.6 way" to handle the exports file
+ if grep -q nfsd /proc/filesystems 2>/dev/null; then
+ if ! grep -q "nfsd /proc/fs/nfs" /proc/mounts 2>/dev/null; then
+ ebegin "Mounting nfsd filesystem in /proc"
+ mount -t nfsd nfsd /proc/fs/nfs
+ eend $? "Error mounting nfsd filesystem in /proc"
+ fi
+ fi
+ # now that nfsd is mounted inside /proc, we can safely start mountd later
+
+ start_idmapd
+ start_statd
+
+ # Exportfs likes to hang if networking isn't working.
+ # If that's the case, then try to kill it so the
+ # bootup process can continue.
+ if grep -q '^/' /etc/exports 2>/dev/null; then
+ ebegin "Exporting NFS directories"
+ $exportfs -r 1>&2 &
+ waitfor_exportfs $!
+ eend $? "Error exporting NFS directories"
+ fi
+
+ if [ -x "${rquotad}" ]; then
+ ebegin "Starting NFS rquotad"
+ start-stop-daemon --start --quiet --exec \
+ $rquotad -- $RPCRQUOTADOPTS 1>&2
+ eend $? "Error starting NFS rquotad"
+ fi
+
+ ebegin "Starting NFS daemon"
+ start-stop-daemon --start --quiet --exec \
+ $nfsd -- $RPCNFSDCOUNT 1>&2
+ eend $? "Error starting NFS daemon"
+
+ # Start mountd
+ ebegin "Starting NFS mountd"
+ start-stop-daemon --start --quiet --exec \
+ $mountd -- $RPCMOUNTDOPTS 1>&2
+ eend $? "Error starting NFS mountd"
+}
+
+stop() {
+ # Don't check NFSSERVER variable since it might have changed,
+ # instead use --oknodo to smooth things over
+ ebegin "Stopping NFS mountd"
+ start-stop-daemon --stop --quiet --oknodo \
+ --exec $mountd 1>&2
+ eend $? "Error stopping NFS mountd"
+
+ # nfsd sets its process name to [nfsd] so don't look for $nfsd
+ ebegin "Stopping NFS daemon"
+ start-stop-daemon --stop --quiet --oknodo \
+ --name nfsd --user root --signal 2 1>&2
+ eend $? "Error stopping NFS daemon"
+
+ if [ -x $rquotad ]; then
+ ebegin "Stopping NFS rquotad"
+ start-stop-daemon --stop --quiet --oknodo \
+ --exec $rquotad 1>&2
+ eend $? "Error stopping NFS rquotad"
+ fi
+
+ # When restarting the NFS server, running "exportfs -ua" probably
+ # isn't what the user wants. Running it causes all entries listed
+ # in xtab to be removed from the kernel export tables, and the
+ # xtab file is cleared. This effectively shuts down all NFS
+ # activity, leaving all clients holding stale NFS filehandles,
+ # *even* when the NFS server has restarted.
+ #
+ # That's what you would want if you were shutting down the NFS
+ # server for good, or for a long period of time, but not when the
+ # NFS server will be running again in short order. In this case,
+ # then "exportfs -r" will reread the xtab, and all the current
+ # clients will be able to resume NFS activity, *without* needing
+ # to umount/(re)mount the filesystem.
+ if [ "$restarting" = no -a "${RC_CMD}" != "restart" ]; then
+ ebegin "Unexporting NFS directories"
+ # Exportfs likes to hang if networking isn't working.
+ # If that's the case, then try to kill it so the
+ # shutdown process can continue.
+ $exportfs -ua 1>&2 &
+ waitfor_exportfs $!
+ eend $? "Error unexporting NFS directories"
+ fi
+
+ stop_statd
+ stop_idmapd
+}
+
+reload() {
+ # Exportfs likes to hang if networking isn't working.
+ # If that's the case, then try to kill it so the
+ # bootup process can continue.
+ ebegin "Reloading /etc/exports"
+ $exportfs -r 1>&2 &
+ waitfor_exportfs $!
+ eend $? "Error exporting NFS directories"
+}
+
+restart() {
+ # See long comment in stop() regarding "restarting" and exportfs -ua
+ restarting=yes
+ svc_stop
+ svc_start
+}
diff --git a/sys-freebsd/freebsd-usbin/files/nfsmount.initd b/sys-freebsd/freebsd-usbin/files/nfsmount.initd
new file mode 100755
index 0000000..9208804
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/nfsmount.initd
@@ -0,0 +1,63 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/nfsmount.initd,v 1.3 2007/04/06 14:47:17 uberlord Exp $
+
+depend() {
+ need net rpcbind
+ use ypbind
+}
+
+start_statd() {
+ # Don't start rpc.statd if already started by init.d/nfs
+ killall -0 rpc.statd 2>/dev/null && return 0
+ ebegin "Starting NFS statd"
+ rpc.statd
+ eend $? "Error starting NFS statd"
+}
+
+stop_statd() {
+ # Don't stop rpc.statd if it's in use by init.d/nfs
+ killall -0 nfsd 2>/dev/null && return 0
+ # Make sure it's actually running
+ killall -0 rpc.statd 2>/dev/null || return 0
+ # Okay, all tests passed, stop rpc.statd
+ ebegin "Stopping NFS statd"
+ killall rpc.statd
+ eend $? "Error stopping NFS statd"
+}
+
+start_lockd() {
+ # Don't start rpc.lockd if already started by init.d/nfs
+ killall -0 rpc.lockd 2>/dev/null && return 0
+ ebegin "Starting NFS lockd"
+ rpc.lockd
+ eend $? "Error starting NFS lockd"
+}
+
+stop_lockd() {
+ # Don't stop rpc.lockd if it's in use by init.d/nfs
+ killall -0 nfsd 2>/dev/null && return 0
+ # Make sure it's actually running
+ killall -0 rpc.lockd 2>/dev/null || return 0
+ # Okay, all tests passed, stop rpc.lockd
+ ebegin "Stopping NFS lockd"
+ killall rpc.lockd
+ eend $? "Error stopping NFS lockd"
+}
+
+start() {
+ start_statd
+ start_lockd
+ ebegin "Mounting NFS filesystems"
+ mount -a -t nfs
+ eend $? "Error mounting NFS filesystems"
+}
+
+stop() {
+ ebegin "Unmounting NFS filesystems"
+ umount -a -t nfs
+ eend $? "Error unmounting NFS filesystems"
+ stop_statd
+ stop_lockd
+}
diff --git a/sys-freebsd/freebsd-usbin/files/powerd.confd b/sys-freebsd/freebsd-usbin/files/powerd.confd
new file mode 100644
index 0000000..793e68b
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/powerd.confd
@@ -0,0 +1,14 @@
+# Copyright 2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/powerd.confd,v 1.2 2006/10/12 14:59:48 uberlord Exp $
+
+# Mode allowed: maximum, minimum, adaptive
+# Default unless specified is adaptive
+
+AC_MODE="maximum"
+
+#BATTERY_MODE="minimum"
+
+POWERD_OPTS=""
+
+
diff --git a/sys-freebsd/freebsd-usbin/files/powerd.initd b/sys-freebsd/freebsd-usbin/files/powerd.initd
new file mode 100755
index 0000000..c99adf8
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/powerd.initd
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+# Copyright 2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/powerd.initd,v 1.3 2007/02/23 14:03:08 uberlord Exp $
+
+depend() {
+ need localmount
+}
+
+start() {
+ local args=
+ [ -n "${BATTERY_MODE}" ] && args="${args} -b ${BATTERY_MODE}"
+ [ -n "${AC_MODE}" ] && args="${args} -a ${AC_MODE}"
+
+ ebegin "Starting Power Control Daemon"
+ start-stop-daemon --start --exec /usr/sbin/powerd \
+ --pidfile /var/run/powerd.pid \
+ -- ${args} ${POWERD_OPTS}
+ eend $? "Failed to start powerd"
+}
+
+stop() {
+ ebegin "Stopping Power Control Daemon"
+ start-stop-daemon --stop --exec /usr/sbin/powerd \
+ --pidfile /var/run/powerd.pid
+ eend $? "Failed to stop powerd"
+}
diff --git a/sys-freebsd/freebsd-usbin/files/pw.conf b/sys-freebsd/freebsd-usbin/files/pw.conf
new file mode 100644
index 0000000..29a246f
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/pw.conf
@@ -0,0 +1,5 @@
+# Change this to Gentoo's Default, instead of FreeBSD's default of
+# /usr/share/skel, so that bash and other packages installs the files on the
+# right place.
+skeleton /etc/skel
+
diff --git a/sys-freebsd/freebsd-usbin/files/rarpd.confd b/sys-freebsd/freebsd-usbin/files/rarpd.confd
new file mode 100644
index 0000000..63c7fac
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/rarpd.confd
@@ -0,0 +1,7 @@
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/rarpd.confd,v 1.1 2006/11/19 17:02:29 flameeyes Exp $
+
+# Configuration file for /etc/init.d/rarpd
+
+# To start rarpd only for a given interface, set the
+# following variable
+# RARPD_ONLY_INTERFACE="rl0"
diff --git a/sys-freebsd/freebsd-usbin/files/rarpd.initd b/sys-freebsd/freebsd-usbin/files/rarpd.initd
new file mode 100644
index 0000000..f5b21c8
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/rarpd.initd
@@ -0,0 +1,35 @@
+#!/sbin/runscript
+# Copyright 2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/rarpd.initd,v 1.3 2007/02/23 14:03:08 uberlord Exp $
+
+depend() {
+ if [ -z "${RARPD_ONLY_INTERFACE}" ]; then
+ need net
+ else
+ need net."${RARPD_ONLY_INTERFACE}"
+ fi
+}
+
+start() {
+ local rarpd_opts
+
+ if [ -z "${RARPD_ONLY_INTERFACE}" ]; then
+ rarpd_opts="${rarpd_opts} -a"
+ else
+ rarpd_opts="${rarpd_opts} ${RARPD_ONLY_INTERFACE}"
+ fi
+
+ ebegin "Starting reverse ARP daemon"
+ start-stop-daemon --start --background \
+ --pidfile /var/run/rarpd.pid --make-pidfile \
+ --exec /usr/sbin/rarpd -- -f ${rarpd_opts}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping reverse ARP daemon"
+ start-stop-daemon --stop --pidfile /var/run/rarpd.pid \
+ --exec /usr/sbin/rarpd -- ${rarpd_opts}
+ eend $?
+}
diff --git a/sys-freebsd/freebsd-usbin/files/rpcbind.initd b/sys-freebsd/freebsd-usbin/files/rpcbind.initd
new file mode 100755
index 0000000..69451f1
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/rpcbind.initd
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/rpcbind.initd,v 1.3 2006/12/07 18:00:15 uberlord Exp $
+
+depend() {
+ need localmount
+ use net
+ before inetd
+ before xinetd
+}
+
+start() {
+ ebegin "Starting rpcbind"
+ start-stop-daemon --start --exec /usr/sbin/rpcbind
+ local ret=$?
+ eend ${ret}
+
+ # without, if a service depending on portmap is started too fast,
+ # connecting to portmap will fail -- azarah
+ # doing that for rpcbind, too -- flameeyes
+ sleep 1
+ return ${ret}
+}
+
+stop() {
+ ebegin "Stopping rpcbind"
+ start-stop-daemon --stop --exec /usr/sbin/rpcbind
+ eend $?
+}
diff --git a/sys-freebsd/freebsd-usbin/files/syscons.confd b/sys-freebsd/freebsd-usbin/files/syscons.confd
new file mode 100644
index 0000000..a6d7cd4
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/syscons.confd
@@ -0,0 +1,14 @@
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/syscons.confd,v 1.1 2006/09/14 17:03:27 flameeyes Exp $
+# Example syscons config file. This is the place to set things like keymap, etc.
+
+# Set the keymap to "uk.iso".
+#KEYMAP="uk.iso"
+
+# Set the keyboard rate to 250ms delay, and 34 repeat rate.
+#KEYRATE="250.34"
+
+# Change the behaviour of F-unction keys (see kbdcontrol(1)).
+#KEYCHANGE="10 'ssh myhost'"
+
+# See vidcontrol(1) -t
+#BLANKTIME="off"
diff --git a/sys-freebsd/freebsd-usbin/files/syscons.initd b/sys-freebsd/freebsd-usbin/files/syscons.initd
new file mode 100755
index 0000000..320b870
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/syscons.initd
@@ -0,0 +1,78 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/syscons.initd,v 1.3 2007/02/23 14:03:08 uberlord Exp $
+
+depend() {
+ need localmount
+}
+
+start() {
+ ebegin "Configuring system console"
+
+ if [ -n "${MODE}" ] ; then
+ einfo "Setting mode to ${MODE}"
+ vidcontrol "${MODE}"
+ eend $?
+ fi
+
+ # XXX: This should handle serial consoles.
+
+ # Set the keymap.
+ if [ -n "${KEYMAP}" ]; then
+ einfo "Setting keymap to" "${KEYMAP}"
+ kbdcontrol -l ${KEYMAP} < /dev/console
+ fi
+
+ if [ -n "${KEYRATE}" ]; then
+ einfo "Setting keyrate to" "${KEYRATE}"
+ kbdcontrol -r ${KEYRATE} < /dev/console
+ fi
+
+ if [ -n "${KEYCHANGE}" ]; then
+ einfo "Changing function keys..."
+ eval set -- "${KEYCHANGE}"
+ eindent
+ while [ $# -gt 0 ] ; do
+ veinfo "F$1 -> \`$2'"
+ kbdcontrol -f "$1" "$2" < /dev/console
+ shift ; shift
+ done
+ eoutdent
+ fi
+
+ if [ -n "${CURSOR}" ]; then
+ einfo "Setting cursor"
+ vidcontrol -c ${CURSOR}
+ fi
+
+ einfo "Setting custom fonts..."
+ # Nothing to see here, move along...
+ for v in FONT8x16 FONT8x14 FONT8x8; do
+ f=$(eval \$"${v}")
+ if [ -n "${f}" ]; then
+ vidcontrol -f ${v##FONT} ${f}
+ fi
+ done
+
+ if [ -n "${BLANKTIME}" ]; then
+ einfo "Setting blanktime"
+ vidcontrol -t ${BLANKTIME}
+ fi
+
+ if [ -n "${SAVER}" ]; then
+ for i in `kldstat | awk '$5 ~ "^splash_.*$" { print $5 }'`; do
+ kldunload ${i}
+ done
+ kldstat -v | grep -q _saver || kldload ${SAVER}_saver
+ fi
+
+ if [ -n "${KBDFLAGS}" ]; then
+ einfo "Setting keyboard flags for all screens"
+ for ttyv in /dev/ttyv*; do
+ kbdcontrol ${KBDFLAGS} <${ttyv} &>${ttyv}
+ done
+ fi
+
+ eend 0
+}
diff --git a/sys-freebsd/freebsd-usbin/files/syslogd.initd b/sys-freebsd/freebsd-usbin/files/syslogd.initd
new file mode 100755
index 0000000..0cb314e
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/syslogd.initd
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/syslogd.initd,v 1.3 2007/02/23 14:03:08 uberlord Exp $
+
+depend() {
+ provide logger
+ need localmount
+}
+
+start() {
+ ebegin "Starting System Logger"
+ start-stop-daemon --start --quiet --exec /usr/sbin/syslogd \
+ -- ${SYSLOGD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping System Logger"
+ start-stop-daemon --stop --quiet --pidfile /var/run/syslog.pid
+ eend $?
+}
+
+
+