summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-freebsd/freebsd-usbin/files')
-rw-r--r--sys-freebsd/freebsd-usbin/files/freebsd-usbin-10.0-bsdxml2expat.patch24
-rw-r--r--sys-freebsd/freebsd-usbin/files/freebsd-usbin-10.3-bsdxml2expat.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-8.2-newsyslog.patch10
-rw-r--r--sys-freebsd/freebsd-usbin/files/freebsd-usbin-9.0-libarchive.patch12
-rw-r--r--sys-freebsd/freebsd-usbin/files/freebsd-usbin-9.0-newsyslog.patch12
-rw-r--r--sys-freebsd/freebsd-usbin/files/freebsd-usbin-9.1-bsdxml2expat.patch12
-rw-r--r--sys-freebsd/freebsd-usbin/files/freebsd-usbin-9.1-kldxref.patch30
-rw-r--r--sys-freebsd/freebsd-usbin/files/freebsd-usbin-adduser.patch20
-rw-r--r--sys-freebsd/freebsd-usbin/files/iscsid.initd20
-rw-r--r--sys-freebsd/freebsd-usbin/files/mountd.patch15
-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.confd10
-rw-r--r--sys-freebsd/freebsd-usbin/files/nfs.initd54
-rw-r--r--sys-freebsd/freebsd-usbin/files/nfsmount.initd63
-rw-r--r--sys-freebsd/freebsd-usbin/files/nfsuserd.confd5
-rw-r--r--sys-freebsd/freebsd-usbin/files/nfsuserd.initd20
-rw-r--r--sys-freebsd/freebsd-usbin/files/powerd.confd14
-rw-r--r--sys-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
-rw-r--r--sys-freebsd/freebsd-usbin/files/rpc.lockd.initd20
-rw-r--r--sys-freebsd/freebsd-usbin/files/rpc.statd.initd20
-rw-r--r--sys-freebsd/freebsd-usbin/files/rpcbind.initd30
-rw-r--r--sys-freebsd/freebsd-usbin/files/syscons.confd14
-rw-r--r--sys-freebsd/freebsd-usbin/files/syscons.initd78
-rw-r--r--sys-freebsd/freebsd-usbin/files/syslogd.initd25
29 files changed, 726 insertions, 0 deletions
diff --git a/sys-freebsd/freebsd-usbin/files/freebsd-usbin-10.0-bsdxml2expat.patch b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-10.0-bsdxml2expat.patch
new file mode 100644
index 0000000..a84f96d
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-10.0-bsdxml2expat.patch
@@ -0,0 +1,24 @@
+diff -Nur work.orig/usr.sbin/ctladm/ctladm.c work/usr.sbin/ctladm/ctladm.c
+--- work.orig/usr.sbin/ctladm/ctladm.c 2012-07-12 13:25:58.000000000 +0900
++++ work/usr.sbin/ctladm/ctladm.c 2012-07-16 05:37:14.000000000 +0900
+@@ -60,7 +60,7 @@
+ #include <errno.h>
+ #include <err.h>
+ #include <ctype.h>
+-#include <bsdxml.h>
++#include <expat.h>
+ #include <cam/scsi/scsi_all.h>
+ #include <cam/scsi/scsi_message.h>
+ #include <cam/ctl/ctl.h>
+diff -Nur work.orig/usr.sbin/ctld/kernel.c work/usr.sbin/ctld/kernel.c
+--- work.orig/usr.sbin/ctld/kernel.c 2013-09-20 21:55:45.000000000 +0900
++++ work/usr.sbin/ctld/kernel.c 2013-09-20 22:01:17.000000000 +0900
+@@ -45,7 +45,7 @@
+ #include <sys/sbuf.h>
+ #include <sys/capability.h>
+ #include <assert.h>
+-#include <bsdxml.h>
++#include <expat.h>
+ #include <ctype.h>
+ #include <errno.h>
+ #include <fcntl.h>
diff --git a/sys-freebsd/freebsd-usbin/files/freebsd-usbin-10.3-bsdxml2expat.patch b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-10.3-bsdxml2expat.patch
new file mode 100644
index 0000000..207b6ab
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-10.3-bsdxml2expat.patch
@@ -0,0 +1,13 @@
+diff --git a/usr.sbin/camdd/camdd.c b/usr.sbin/camdd/camdd.c
+index 88c648e..edf9c8b 100644
+--- a/usr.sbin/camdd/camdd.c
++++ b/usr.sbin/camdd/camdd.c
+@@ -71,7 +71,7 @@ __FBSDID("$FreeBSD: stable/10/usr.sbin/camdd/camdd.c 293409 2016-01-08 02:56:21Z
+ #include <libutil.h>
+ #include <pthread.h>
+ #include <assert.h>
+-#include <bsdxml.h>
++#include <expat.h>
+
+ #include <cam/cam.h>
+ #include <cam/cam_debug.h>
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..9b11104
--- /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+= -DLIBWRAP
++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-8.2-newsyslog.patch b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-8.2-newsyslog.patch
new file mode 100644
index 0000000..a098391
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-8.2-newsyslog.patch
@@ -0,0 +1,10 @@
+--- usr.sbin/newsyslog/pathnames.h.orig 2001-07-30 18:17:17.000000000 +0300
++++ usr.sbin/newsyslog/pathnames.h 2009-09-11 08:32:57.508226240 +0300
+@@ -24,5 +24,5 @@
+
+ #define _PATH_CONF "/etc/newsyslog.conf"
+ #define _PATH_SYSLOGPID _PATH_VARRUN "syslog.pid"
+-#define _PATH_BZIP2 "/usr/bin/bzip2"
+-#define _PATH_GZIP "/usr/bin/gzip"
++#define _PATH_BZIP2 "/bin/bzip2"
++#define _PATH_GZIP "/bin/gzip"
diff --git a/sys-freebsd/freebsd-usbin/files/freebsd-usbin-9.0-libarchive.patch b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-9.0-libarchive.patch
new file mode 100644
index 0000000..bfe4794
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-9.0-libarchive.patch
@@ -0,0 +1,12 @@
+--- usr.sbin/bsdinstall/distextract/distextract.c.old 2011-11-02 20:28:08.000000000 +0000
++++ usr.sbin/bsdinstall/distextract/distextract.c 2011-11-02 20:28:57.000000000 +0000
+@@ -32,6 +32,9 @@
+ #include <limits.h>
+ #include <archive.h>
+ #include <dialog.h>
++#ifndef archive_read_free
++#define archive_read_free(x) archive_read_finish(x)
++#endif
+
+ static int extract_files(int nfiles, const char **files);
+
diff --git a/sys-freebsd/freebsd-usbin/files/freebsd-usbin-9.0-newsyslog.patch b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-9.0-newsyslog.patch
new file mode 100644
index 0000000..1d83865
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-9.0-newsyslog.patch
@@ -0,0 +1,12 @@
+diff -uNr usr.sbin/newsyslog.old/pathnames.h usr.sbin/newsyslog/pathnames.h
+--- usr.sbin/newsyslog.old/pathnames.h 2011-11-02 20:12:37.000000000 +0000
++++ usr.sbin/newsyslog/pathnames.h 2011-11-02 20:12:50.000000000 +0000
+@@ -24,6 +24,6 @@
+
+ #define _PATH_CONF "/etc/newsyslog.conf"
+ #define _PATH_SYSLOGPID _PATH_VARRUN "syslog.pid"
+-#define _PATH_BZIP2 "/usr/bin/bzip2"
+-#define _PATH_GZIP "/usr/bin/gzip"
++#define _PATH_BZIP2 "/bin/bzip2"
++#define _PATH_GZIP "/bin/gzip"
+ #define _PATH_XZ "/usr/bin/xz"
diff --git a/sys-freebsd/freebsd-usbin/files/freebsd-usbin-9.1-bsdxml2expat.patch b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-9.1-bsdxml2expat.patch
new file mode 100644
index 0000000..bddc0c7
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-9.1-bsdxml2expat.patch
@@ -0,0 +1,12 @@
+diff -Nur work.orig/usr.sbin/ctladm/ctladm.c work/usr.sbin/ctladm/ctladm.c
+--- work.orig/usr.sbin/ctladm/ctladm.c 2012-07-12 13:25:58.000000000 +0900
++++ work/usr.sbin/ctladm/ctladm.c 2012-07-16 05:37:14.000000000 +0900
+@@ -60,7 +60,7 @@
+ #include <errno.h>
+ #include <err.h>
+ #include <ctype.h>
+-#include <bsdxml.h>
++#include <expat.h>
+ #include <cam/scsi/scsi_all.h>
+ #include <cam/scsi/scsi_message.h>
+ #include <cam/ctl/ctl.h>
diff --git a/sys-freebsd/freebsd-usbin/files/freebsd-usbin-9.1-kldxref.patch b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-9.1-kldxref.patch
new file mode 100644
index 0000000..95bd665
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-9.1-kldxref.patch
@@ -0,0 +1,30 @@
+Index: usr.sbin/kldxref/kldxref.c
+===================================================================
+--- usr.sbin/kldxref/kldxref.c (revision 265111)
++++ usr.sbin/kldxref/kldxref.c (working copy)
+@@ -274,6 +274,16 @@ usage(void)
+ exit(1);
+ }
+
++static int
++compare(const FTSENT *const *a, const FTSENT *const *b)
++{
++ if ((*a)->fts_info == FTS_D && (*b)->fts_info != FTS_D)
++ return 1;
++ if ((*a)->fts_info != FTS_D && (*b)->fts_info == FTS_D)
++ return -1;
++ return strcmp((*a)->fts_name, (*b)->fts_name);
++}
++
+ int
+ main(int argc, char *argv[])
+ {
+@@ -315,7 +325,7 @@ main(int argc, char *argv[])
+ err(1, "%s", argv[0]);
+ }
+
+- ftsp = fts_open(argv, fts_options, 0);
++ ftsp = fts_open(argv, fts_options, compare);
+ if (ftsp == NULL)
+ exit(1);
+
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/iscsid.initd b/sys-freebsd/freebsd-usbin/files/iscsid.initd
new file mode 100644
index 0000000..f16d00e
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/iscsid.initd
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting iscsid"
+ start-stop-daemon --start --quiet --exec \
+ /usr/sbin/iscsid -- $iscsidopts
+ eend $? "Error starting iscsid"
+}
+
+stop() {
+ ebegin "Stopping iscsid"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/iscsid
+ eend $? "Error stopping iscsid"
+}
diff --git a/sys-freebsd/freebsd-usbin/files/mountd.patch b/sys-freebsd/freebsd-usbin/files/mountd.patch
new file mode 100644
index 0000000..3cb9f03
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/mountd.patch
@@ -0,0 +1,15 @@
+http://security.freebsd.org/advisories/FreeBSD-SA-11:01.mountd.asc
+
+Index: usr.sbin/mountd/mountd.c
+===================================================================
+--- usr.sbin/mountd/mountd.c 20 Dec 2010 09:28:28 -0000 1.107
++++ usr.sbin/mountd/mountd.c 1 Mar 2011 11:47:16 -0000 1.108
+@@ -2875,7 +2875,7 @@ makemask(struct sockaddr_storage *ssp, i
+
+ for (i = 0; i < len; i++) {
+ bits = (bitlen > CHAR_BIT) ? CHAR_BIT : bitlen;
+- *p++ = (1 << bits) - 1;
++ *p++ = (u_char)~0 << (CHAR_BIT - bits);
+ bitlen -= bits;
+ }
+ return 0;
diff --git a/sys-freebsd/freebsd-usbin/files/moused.confd b/sys-freebsd/freebsd-usbin/files/moused.confd
new file mode 100644
index 0000000..4d64933
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/moused.confd
@@ -0,0 +1,20 @@
+# $Id$
+
+# 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..d7ca8e0
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/moused.initd
@@ -0,0 +1,66 @@
+#!/sbin/openrc-run
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..844252f
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/nfs.confd
@@ -0,0 +1,10 @@
+# Config file for /etc/init.d/nfs
+# Options for nfsd (see man nfsd)
+# Example: 8 nfsd servers started:
+#nfsdopts="-n 8"
+
+# Options for mountd (see man mountd)
+# Example: allow non-root users to mount shares:
+#mountdopts="-n"
+# Specify t he exports file, this is the default:
+#exportsfile="/etc/exports"
diff --git a/sys-freebsd/freebsd-usbin/files/nfs.initd b/sys-freebsd/freebsd-usbin/files/nfs.initd
new file mode 100644
index 0000000..17974ca
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/nfs.initd
@@ -0,0 +1,54 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+#---------------------------------------------------------------------------
+# This script starts/stops nfsd and mountd
+# Daemons rpc.rquotad, rpc.rstatd, rpc.rusersd, rpc.rwalld and rpc.sprayd
+# should be started from inetd on FreeBSD.
+#---------------------------------------------------------------------------
+
+extra_started_commands="reload"
+
+# The binary locations
+nfsd=/usr/sbin/nfsd
+mountd=/usr/sbin/mountd
+
+depend() {
+ use ypbind net rpc.lockd
+ need rpcbind
+ after quota
+}
+
+start() {
+ ebegin "Starting NFS daemon"
+ start-stop-daemon --start --quiet --exec \
+ $nfsd -- ${nfsdopts}
+ eend $? "Error starting NFS daemon"
+
+ # Start mountd
+ ebegin "Starting NFS mountd"
+ start-stop-daemon --start --quiet --exec \
+ $mountd -- ${mountdopts} ${exportsfile}
+ eend $? "Error starting NFS mountd"
+}
+
+stop() {
+ ebegin "Stopping NFS mountd"
+ start-stop-daemon --stop --quiet --exec $mountd \
+ --pidfile /var/run/mountd.pid
+ eend $? "Error stopping NFS mountd"
+
+ ebegin "Stopping NFS daemon"
+ start-stop-daemon --stop --signal USR1 --quiet \
+ --name nfsd --user root
+ eend $? "Error stopping NFS daemon"
+}
+
+reload() {
+ # Hangup signal to mountd reloads /etc/exports.
+ ebegin "Reloading /etc/exports"
+ start-stop-daemon --signal 1 --quiet --exec $mountd \
+ --pidfile /var/run/mountd.pid
+ eend $?
+}
diff --git a/sys-freebsd/freebsd-usbin/files/nfsmount.initd b/sys-freebsd/freebsd-usbin/files/nfsmount.initd
new file mode 100644
index 0000000..2fb4901
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/nfsmount.initd
@@ -0,0 +1,63 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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/nfsuserd.confd b/sys-freebsd/freebsd-usbin/files/nfsuserd.confd
new file mode 100644
index 0000000..f8f3ea1
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/nfsuserd.confd
@@ -0,0 +1,5 @@
+# Config file for /etc/init.d/nfsuserd
+# Options for nfsuserd (see man nfsuserd)
+# Example: set domain example.com:
+#nfsuserdopts="-domain example.com"
+
diff --git a/sys-freebsd/freebsd-usbin/files/nfsuserd.initd b/sys-freebsd/freebsd-usbin/files/nfsuserd.initd
new file mode 100644
index 0000000..d690074
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/nfsuserd.initd
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net nfs
+}
+
+start() {
+ ebegin "Starting nfsuserd"
+ start-stop-daemon --start --quiet --exec \
+ /usr/sbin/nfsuserd -- $nfsuserdopts
+ eend $? "Error starting nfsuserd"
+}
+
+stop() {
+ ebegin "Stopping nfsuserd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/nfsuserd
+ eend $? "Error stopping nfsuserd"
+}
diff --git a/sys-freebsd/freebsd-usbin/files/powerd.confd b/sys-freebsd/freebsd-usbin/files/powerd.confd
new file mode 100644
index 0000000..e5db5a1
--- /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
+# $Id$
+
+# 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 100644
index 0000000..ff79f63
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/powerd.initd
@@ -0,0 +1,27 @@
+#!/sbin/openrc-run
+# Copyright 2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..b56fdd5
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/rarpd.confd
@@ -0,0 +1,7 @@
+# $Id$
+
+# 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..3c2a3ff
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/rarpd.initd
@@ -0,0 +1,35 @@
+#!/sbin/openrc-run
+# Copyright 2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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/rpc.lockd.initd b/sys-freebsd/freebsd-usbin/files/rpc.lockd.initd
new file mode 100644
index 0000000..dd2fdbe
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/rpc.lockd.initd
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net rpcbind rpc.statd
+}
+
+start() {
+ ebegin "Starting NFS lockd"
+ start-stop-daemon --start --quiet --exec \
+ /usr/sbin/rpc.lockd -- $rpclockdopts
+ eend $? "Error starting NFS lockd"
+}
+
+stop() {
+ ebegin "Stopping NFS lockd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/rpc.lockd
+ eend $? "Error stopping NFS lockd"
+}
diff --git a/sys-freebsd/freebsd-usbin/files/rpc.statd.initd b/sys-freebsd/freebsd-usbin/files/rpc.statd.initd
new file mode 100644
index 0000000..163af5a
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/rpc.statd.initd
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net rpcbind
+}
+
+start() {
+ ebegin "Starting NFS statd"
+ start-stop-daemon --start --quiet --exec \
+ /usr/sbin/rpc.statd -- $rpcstatdopts
+ eend $? "Error starting NFS statd"
+}
+
+stop() {
+ ebegin "Stopping NFS statd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/rpc.statd
+ eend $? "Error stopping NFS statd"
+}
diff --git a/sys-freebsd/freebsd-usbin/files/rpcbind.initd b/sys-freebsd/freebsd-usbin/files/rpcbind.initd
new file mode 100644
index 0000000..1ff98a5
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/rpcbind.initd
@@ -0,0 +1,30 @@
+#!/sbin/openrc-run
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..7ba81ff
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/syscons.confd
@@ -0,0 +1,14 @@
+# $Id$
+# 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 100644
index 0000000..5ab3075
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/syscons.initd
@@ -0,0 +1,78 @@
+#!/sbin/openrc-run
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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} 2>&1
+ 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 100644
index 0000000..87c40cd
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/syslogd.initd
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 $?
+}
+
+
+