public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/openrc:master commit in: sh/, conf.d/, init.d/, mk/
@ 2014-10-22 16:23 William Hubbs
  0 siblings, 0 replies; only message in thread
From: William Hubbs @ 2014-10-22 16:23 UTC (permalink / raw
  To: gentoo-commits

commit:     d8e1d9a6edf94ecac580e80e1113f4fdbdc5a23b
Author:     Gabriele Giacone <1o5g4r8o <AT> gmail <DOT> com>
AuthorDate: Tue Oct 21 07:24:12 2014 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Oct 22 16:09:58 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=d8e1d9a6

Add missing files for GNU/kFreeBSD

---
 conf.d/network.GNU-kFreeBSD.in     |  4 ++++
 conf.d/staticroute.GNU-kFreeBSD.in |  5 +++++
 init.d/sysctl.GNU-kFreeBSD.in      | 31 +++++++++++++++++++++++++++++++
 mk/os-GNU-kFreeBSD.mk              |  4 +++-
 sh/init.sh.GNU-kFreeBSD.in         | 35 +++++++++++++++++++++++++++++++++++
 5 files changed, 78 insertions(+), 1 deletion(-)

diff --git a/conf.d/network.GNU-kFreeBSD.in b/conf.d/network.GNU-kFreeBSD.in
new file mode 100644
index 0000000..9f49b81
--- /dev/null
+++ b/conf.d/network.GNU-kFreeBSD.in
@@ -0,0 +1,4 @@
+
+# You can assign a default route
+#defaultroute="192.168.0.1"
+#defaultroute6="2001:a:b:c"

diff --git a/conf.d/staticroute.GNU-kFreeBSD.in b/conf.d/staticroute.GNU-kFreeBSD.in
new file mode 100644
index 0000000..9f54152
--- /dev/null
+++ b/conf.d/staticroute.GNU-kFreeBSD.in
@@ -0,0 +1,5 @@
+# Separate multiple routes using ; or new lines.
+
+# Example static routes. See route(8) for syntax.
+#staticroute="net 192.168.0.0 10.73.1.1 netmask 255.255.255.0
+#net 192.168.1.0 10.73.1.1 netmask 255.255.255.0"

diff --git a/init.d/sysctl.GNU-kFreeBSD.in b/init.d/sysctl.GNU-kFreeBSD.in
new file mode 100644
index 0000000..92d5868
--- /dev/null
+++ b/init.d/sysctl.GNU-kFreeBSD.in
@@ -0,0 +1,31 @@
+#!@SBINDIR@/openrc-run
+# Copyright (c) 2007-2009 Roy Marples <roy@marples.name>
+# Released under the 2-clause BSD license.
+
+depend()
+{
+	before bootmisc logger
+	keyword -prefix
+}
+
+start()
+{
+	[ -e /etc/sysctl.conf ] || return 0
+	local retval=0 var= comments= conf=
+	ebegin "Configuring kernel parameters"
+	eindent
+	for conf in @SYSCONFDIR@/sysctl.conf @SYSCONFDIR@/sysctl.d/*.conf; do
+		if [ -r "$conf" ]; then
+			vebegin "applying $conf"
+			while read var comments; do
+				case "$var" in
+				""|"#"*) continue;;
+				esac
+				sysctl -w "$var" >/dev/null || retval=1
+			done < "$conf"
+			veend $retval
+		fi
+	done
+	eoutdent
+	eend $retval "Some errors were encountered"
+}

diff --git a/mk/os-GNU-kFreeBSD.mk b/mk/os-GNU-kFreeBSD.mk
index 72fea3e..c217372 100644
--- a/mk/os-GNU-kFreeBSD.mk
+++ b/mk/os-GNU-kFreeBSD.mk
@@ -3,7 +3,9 @@
 
 # Generic definitions
 
+SFX=		.GNU-kFreeBSD.in
+PKG_PREFIX?=	/usr
+
 CPPFLAGS+=	-D_BSD_SOURCE -D_XOPEN_SOURCE=700
 LIBDL=		-Wl,-Bdynamic -ldl
 LIBKVM?=
-include ${MK}/os-BSD.mk

diff --git a/sh/init.sh.GNU-kFreeBSD.in b/sh/init.sh.GNU-kFreeBSD.in
new file mode 100644
index 0000000..d1a04e1
--- /dev/null
+++ b/sh/init.sh.GNU-kFreeBSD.in
@@ -0,0 +1,35 @@
+#!@SHELL@
+# Copyright (c) 2007-2009 Roy Marples <roy@marples.name>
+# Released under the 2-clause BSD license.
+
+if [ ! -d /run ]; then
+    ebegin "Creating /run"
+    mkdir -p /run
+    eend $?
+fi
+
+if [ -L $RC_SVCDIR ]; then
+    rm $RC_SVCDIR
+fi
+
+ebegin "Mounting /run"
+if ! fstabinfo --mount /run; then
+    mount -t tmpfs -o mode=0755,noexec,nosuid,size=10% tmpfs /run
+    if [ $? != 0 ]; then
+        eerror "Unable to mount tmpfs on /run."
+        eerror "Can't continue."
+        exit 1
+    fi
+fi
+eend
+
+ebegin "Creating $RC_SVCDIR"
+mkdir -p $RC_SVCDIR
+eend $?
+
+if [ -e "$RC_LIBEXECDIR"/cache/deptree ]; then
+    cp -p "$RC_LIBEXECDIR"/cache/* "$RC_SVCDIR" 2>/dev/null
+fi
+
+echo sysinit >"$RC_SVCDIR"/softlevel
+exit 0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-10-22 16:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-22 16:23 [gentoo-commits] proj/openrc:master commit in: sh/, conf.d/, init.d/, mk/ William Hubbs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox