Add missing files for GNU/kFreeBSD

This commit is contained in:
Gabriele Giacone 2014-10-21 02:24:12 -05:00 committed by William Hubbs
parent 3f82edbeb9
commit d8e1d9a6ed
5 changed files with 78 additions and 1 deletions

View File

@ -0,0 +1,4 @@
# You can assign a default route
#defaultroute="192.168.0.1"
#defaultroute6="2001:a:b:c"

View File

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

View File

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

View File

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

View File

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