aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSvante Signell <svante.signell@gmail.com>2014-10-22 14:25:00 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2014-10-23 13:00:24 -0500
commit203b754f843fe6af0a40e983d557a9cdbc89f84b (patch)
treebc2cfdb441feb21382143baf22d49d1e8850e92a
parent89c8a62a1078e770e12c47f06c8dbc9c2924e771 (diff)
add missing files for GNU/Hurd
-rw-r--r--conf.d/network.GNU.in4
-rw-r--r--conf.d/staticroute.GNU.in7
-rw-r--r--etc/rc.conf.GNU14
-rw-r--r--init.d/sysctl.GNU.in32
-rw-r--r--mk/os-GNU.mk8
-rw-r--r--sh/init.sh.GNU.in38
6 files changed, 103 insertions, 0 deletions
diff --git a/conf.d/network.GNU.in b/conf.d/network.GNU.in
new file mode 100644
index 00000000..78aa412e
--- /dev/null
+++ b/conf.d/network.GNU.in
@@ -0,0 +1,4 @@
+
+# You can assign a default route
+#defaultroute="gw 192.168.0.1"
+#defaultroute6="gw 2001:a:b:c"
diff --git a/conf.d/staticroute.GNU.in b/conf.d/staticroute.GNU.in
new file mode 100644
index 00000000..58d77e3c
--- /dev/null
+++ b/conf.d/staticroute.GNU.in
@@ -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"
diff --git a/etc/rc.conf.GNU b/etc/rc.conf.GNU
new file mode 100644
index 00000000..a9f054ae
--- /dev/null
+++ b/etc/rc.conf.GNU
@@ -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?
diff --git a/init.d/sysctl.GNU.in b/init.d/sysctl.GNU.in
new file mode 100644
index 00000000..71398246
--- /dev/null
+++ b/init.d/sysctl.GNU.in
@@ -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"
+}
diff --git a/mk/os-GNU.mk b/mk/os-GNU.mk
new file mode 100644
index 00000000..bbaba2b0
--- /dev/null
+++ b/mk/os-GNU.mk
@@ -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
diff --git a/sh/init.sh.GNU.in b/sh/init.sh.GNU.in
new file mode 100644
index 00000000..5ba051d9
--- /dev/null
+++ b/sh/init.sh.GNU.in
@@ -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