summaryrefslogtreecommitdiff
path: root/etc.BSD
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-04-05 11:18:42 +0000
committerRoy Marples <roy@marples.name>2007-04-05 11:18:42 +0000
commit5af58b45146ab5253ca964738f4e45287bf963d4 (patch)
tree68d3a9a61fa55dd7fe273db776c375f797edaa5b /etc.BSD
downloadopenrc-5af58b45146ab5253ca964738f4e45287bf963d4.tar.gz
openrc-5af58b45146ab5253ca964738f4e45287bf963d4.tar.bz2
openrc-5af58b45146ab5253ca964738f4e45287bf963d4.tar.xz
Rewrite the core parts in C. We now provide librc so other programs can
query runlevels, services and state without using bash. We also provide libeinfo so other programs can easily use our informational functions. As such, we have dropped the requirement of using bash as the init script shell. We now use /bin/sh and have strived to make the scripts as portable as possible. Shells that work are bash and dash. busybox works provided you disable s-s-d. If you have WIPE_TMP set to yes in conf.d/bootmisc you should disable find too. zsh and ksh do not work at this time. Networking support is currently being re-vamped also as it was heavily bash array based. As such, a new config format is available like so config_eth0="1.2.3.4/24 5.6.7.8/16" or like so config_eth0="'1.2.3.4 netmask 255.255.255.0' '5.6.7.8 netmask 255.255.0.0'" We will still support the old bash array format provided that /bin/sh IS a link it bash. ChangeLog for baselayout-1 can be found in our SVN repo.
Diffstat (limited to 'etc.BSD')
-rw-r--r--etc.BSD/COPYRIGHT2
-rw-r--r--etc.BSD/Makefile5
-rw-r--r--etc.BSD/issue3
-rw-r--r--etc.BSD/issue.logo13
-rw-r--r--etc.BSD/login.conf65
-rw-r--r--etc.BSD/rc14
-rw-r--r--etc.BSD/rc.shutdown17
7 files changed, 119 insertions, 0 deletions
diff --git a/etc.BSD/COPYRIGHT b/etc.BSD/COPYRIGHT
new file mode 100644
index 0000000..378f62f
--- /dev/null
+++ b/etc.BSD/COPYRIGHT
@@ -0,0 +1,2 @@
+Copyright 1996-2007 Gentoo Foundation
+Copyright 1992-2007 The FreeBSD Project
diff --git a/etc.BSD/Makefile b/etc.BSD/Makefile
new file mode 100644
index 0000000..b78ea8b
--- /dev/null
+++ b/etc.BSD/Makefile
@@ -0,0 +1,5 @@
+DIR = /etc
+FILES = COPYRIGHT issue issue.logo login.conf rc rc.shutdown
+
+TOPDIR = ..
+include $(TOPDIR)/default.mk
diff --git a/etc.BSD/issue b/etc.BSD/issue
new file mode 100644
index 0000000..7a303df
--- /dev/null
+++ b/etc.BSD/issue
@@ -0,0 +1,3 @@
+
+This is %h (%s %m %r) %d
+
diff --git a/etc.BSD/issue.logo b/etc.BSD/issue.logo
new file mode 100644
index 0000000..81946e2
--- /dev/null
+++ b/etc.BSD/issue.logo
@@ -0,0 +1,13 @@
+ .
+ .vir. d$b
+ .d$$$$$$b. .cd$$b. .d$$b. d$$$$$$$$$$$b .d$$b. .d$$b.
+ $$$$( )$$$b d$$$()$$$. d$$$$$$$b Q$$$$$$$P$$$P.$$$$$$$b. .$$$$$$$b.
+ Q$$$$$$$$$$B$$$$$$$$P" d$$$PQ$$$$b. $$$$. .$$$P' `$$$ .$$$P' `$$$
+ "$$$$$$$P Q$$$$$$$b d$$$P Q$$$$b $$$$b $$$$b..d$$$ $$$$b..d$$$
+ d$$$$$$P" "$$$$$$$$ Q$$$ Q$$$$ $$$$$ `Q$$$$$$$P `Q$$$$$$$P
+ $$$$$$$P `""""" "" "" Q$$$P "Q$$$P" "Q$$$P"
+ `Q$$P" """
+
+
+This is %h (%s %m %r) %d
+
diff --git a/etc.BSD/login.conf b/etc.BSD/login.conf
new file mode 100644
index 0000000..e38f170
--- /dev/null
+++ b/etc.BSD/login.conf
@@ -0,0 +1,65 @@
+# login.conf - login class capabilities database.
+#
+# Remember to rebuild the database after each change to this file:
+#
+# cap_mkdb /etc/login.conf
+#
+# This file controls resource limits, accounting limits and
+# default user environment settings.
+
+# defaults
+# These settings are used by login(1) by default for classless users
+# Note that entries like "cputime" set both "cputime-cur" and "cputime-max"
+
+default:\
+ :passwd_format=md5:\
+ :copyright=/etc/COPYRIGHT:\
+ :welcome=/etc/motd:\
+ :setenv=FTP_PASSIVE_MODE=YES:\
+ :path=/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin ~/bin:\
+ :nologin=/etc/nologin:\
+ :cputime=unlimited:\
+ :datasize=unlimited:\
+ :stacksize=unlimited:\
+ :memorylocked=unlimited:\
+ :memoryuse=unlimited:\
+ :filesize=unlimited:\
+ :coredumpsize=unlimited:\
+ :openfiles=unlimited:\
+ :maxproc=unlimited:\
+ :sbsize=unlimited:\
+ :vmemoryuse=unlimited:\
+ :priority=0:\
+ :ignoretime@:\
+ :umask=022:
+
+#
+# Root can always login
+#
+# N.B. login_getpwclass(3) will use this entry for the root account,
+# in preference to 'default'.
+root:\
+ :ignorenologin:\
+ :tc=default:
+
+#
+# A collection of common class names - forward them all to 'default'
+# (login would normally do this anyway, but having a class name
+# here suppresses the diagnostic)
+#
+standard:\
+ :tc=default:
+xuser:\
+ :tc=default:
+daemon:\
+ :tc=default:
+news:\
+ :tc=default:
+
+#
+# Russian Users Accounts. Setup proper environment variables.
+#
+#russian|Russian Users Accounts:\
+# :charset=KOI8-R:\
+# :lang=ru_RU.KOI8-R:\
+# :tc=default:
diff --git a/etc.BSD/rc b/etc.BSD/rc
new file mode 100644
index 0000000..64fb4df
--- /dev/null
+++ b/etc.BSD/rc
@@ -0,0 +1,14 @@
+#!/bin/sh
+# Copyright 2006-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Ensure we are called by init
+[ "$PPID" = "1" ] || exit 0
+
+# BSD's init works somewhat differently to sysvinit.
+# This block should 'translate' from the way init calls it to the way it would
+# be called by sysvinit on linux.
+
+RUNLEVEL="1" /sbin/rc sysinit || exit 1
+RUNLEVEL="1" /sbin/rc boot || exit 1
+/sbin/rc default || exit 1
diff --git a/etc.BSD/rc.shutdown b/etc.BSD/rc.shutdown
new file mode 100644
index 0000000..737002d
--- /dev/null
+++ b/etc.BSD/rc.shutdown
@@ -0,0 +1,17 @@
+#!/bin/sh
+# Copyright 2006-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Ensure we are called by init
+[ "$PPID" = "1" ] || exit 0
+
+# Try and use stuff in /lib over anywhere else so we can shutdown
+# local mounts correctly.
+LD_LIBRARY_PATH="/lib${LD_LIBRARY_PATH:+:}${LDLIBRARY_PATH}"
+export LD_LIBRARY_PATH
+
+# BSD's init works somewhat differently to sysvinit.
+# This block should 'translate' from the way init calls it to the way it would
+# be called by sysvinit on linux.
+export RUNLEVEL=S
+exec /sbin/rc "$1"