add missing files for GNU/Hurd

This commit is contained in:
Svante Signell 2014-10-22 14:25:00 -05:00 committed by William Hubbs
parent 89c8a62a10
commit 203b754f84
6 changed files with 103 additions and 0 deletions

4
conf.d/network.GNU.in Normal file
View File

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

View File

@ -0,0 +1,7 @@
# Separate multiple routes using ; or new lines.
# /etc/route.conf(5) takes precedence over this configuration.
# Example static routes. See route(8) for syntax.
# FIXME: "net ..." not supported
#staticroute="net 192.168.0.0 -netmask 255.255.255.0 --address 10.73.1.1
#net 192.168.1.0 -netmask 255.255.255.0 --address 10.73.1.1"

14
etc/rc.conf.GNU Normal file
View File

@ -0,0 +1,14 @@
##############################################################################
# GNU/Hurd SPECIFIC OPTIONS
# This is the subsystem type. Valid options on GNU/Hurd:
# "" - nothing special
# "subhurd" - Hurd subhurds (to be checked)
# If this is commented out, automatic detection will be used.
#
# This should be set to the value representing the environment this file is
# PRESENTLY in, not the virtualization the environment is capable of.
#rc_sys=""
# This is the number of tty's used in most of the rc-scripts (like
# consolefont, numlock, etc ...)
#rc_tty_number=6?

32
init.d/sysctl.GNU.in Normal file
View File

@ -0,0 +1,32 @@
#!@PREFIX@/sbin/runscript
# Copyright (c) 2007-2009 Roy Marples <roy@marples.name>
# Released under the 2-clause BSD license.
#FIXME: Modify for GNU/Hurd
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"
}

8
mk/os-GNU.mk Normal file
View File

@ -0,0 +1,8 @@
# Copyright (c) 2008 Roy Marples <roy@marples.name>
# Released under the 2-clause BSD license.
SFX= .GNU.in
PKG_PREFIX?= /usr
CPPFLAGS+= -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -DMAXPATHLEN=4096 -DMAX_PATH=4096
LIBDL= -Wl,-Bdynamic -ldl

38
sh/init.sh.GNU.in Normal file
View File

@ -0,0 +1,38 @@
#!@SHELL@
# Copyright (c) 2007-2009 Roy Marples <roy@marples.name>
# Copyright (c) 2014 Svante Signell <svante.signell@gmail.com>
# 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
if ! mountinfo -q /run; then
ebegin "Mounting /run"
if ! fstabinfo --mount /run; then
mount -t tmpfs -o mode=0755,no-suid,size=10% tmpfs /run
if [ $? != 0 ]; then
eerror "Unable to mount tmpfs on /run."
eerror "Can't continue."
exit 1
fi
fi
eend
fi
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