summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AUTHORS10
-rw-r--r--CONTRIBUTING5
-rw-r--r--COPYING13
-rw-r--r--DCO37
-rw-r--r--INSTALL83
-rw-r--r--Makefile87
-rw-r--r--NEWS6
-rwxr-xr-xconfigure196
-rw-r--r--package/deps.mak126
-rw-r--r--package/info4
-rw-r--r--package/modes1
-rw-r--r--package/targets.mak130
-rwxr-xr-xsrc/lib/service/system/getty-12/run5
-rw-r--r--src/lib/source/system/mount/mount-fstab/dependencies.d/mount-dev0
-rw-r--r--src/lib/source/system/mount/mount-fstab/down7
-rw-r--r--src/lib/source/system/mount/mount-fstab/type1
-rw-r--r--src/lib/source/system/mount/mount-fstab/up7
-rw-r--r--src/lib/source/system/mount/mount-tmp/down8
-rw-r--r--src/lib/source/system/mount/mount-tmp/type1
-rw-r--r--src/lib/source/system/mount/mount-tmp/up7
-rw-r--r--src/lib/source/system/mount/remount-root/down7
-rw-r--r--src/lib/source/system/mount/remount-root/type1
-rw-r--r--src/lib/source/system/mount/remount-root/up7
-rw-r--r--src/lib/source/system/net/hostname/type1
-rw-r--r--src/lib/source/system/net/hostname/up9
-rw-r--r--src/lib/source/system/other/dmesg-srv/dependencies.d/mount-dev0
-rw-r--r--src/lib/source/system/other/dmesg-srv/producer-for1
-rw-r--r--src/lib/source/system/other/dmesg-srv/run10
-rw-r--r--src/lib/source/system/other/dmesg-srv/type1
-rw-r--r--src/lib/source/system/other/local/down8
-rw-r--r--src/lib/source/system/other/local/type1
-rw-r--r--src/lib/source/system/other/local/up10
-rw-r--r--src/lib/source/system/other/modules/type1
-rw-r--r--src/lib/source/system/other/modules/up19
-rw-r--r--src/lib/source/system/other/random-seed-load/dependencies.d/mount-dev0
-rw-r--r--src/lib/source/system/other/random-seed-load/type1
-rw-r--r--src/lib/source/system/other/random-seed-load/up12
-rw-r--r--src/lib/source/system/other/random-seed-save/dependencies.d/mount0
-rw-r--r--src/lib/source/system/other/random-seed-save/dependencies.d/mount-dev0
-rw-r--r--src/lib/source/system/other/random-seed-save/dependencies.d/random-seed-load0
-rw-r--r--src/lib/source/system/other/random-seed-save/down14
-rw-r--r--src/lib/source/system/other/random-seed-save/type1
-rw-r--r--src/lib/source/system/other/random-seed-save/up14
-rw-r--r--src/lib/source/system/other/swap-fstab/down7
-rw-r--r--src/lib/source/system/other/swap-fstab/type1
-rw-r--r--src/lib/source/system/other/swap-fstab/up7
-rw-r--r--src/lib/source/system/other/syslog-priv-srv/dependencies.d/mount0
-rw-r--r--src/lib/source/system/other/syslog-priv-srv/notification-fd1
-rw-r--r--src/lib/source/system/other/syslog-priv-srv/producer-for1
-rw-r--r--src/lib/source/system/other/syslog-priv-srv/run12
-rw-r--r--src/lib/source/system/other/syslog-priv-srv/type1
-rw-r--r--src/lib/source/system/other/syslog-srv/dependencies.d/mount0
-rw-r--r--src/lib/source/system/other/syslog-srv/notification-fd1
-rw-r--r--src/lib/source/system/other/syslog-srv/producer-for1
-rw-r--r--src/lib/source/system/other/syslog-srv/run12
-rw-r--r--src/lib/source/system/other/syslog-srv/type1
-rw-r--r--src/lib/source/system/udev/devd-log/consumer-for1
-rw-r--r--src/lib/source/system/udev/devd-log/no-ml0
-rw-r--r--src/lib/source/system/udev/devd-log/notification-fd1
-rw-r--r--src/lib/source/system/udev/devd-log/pipeline-name1
-rw-r--r--src/lib/source/system/udev/devd-log/run11
-rw-r--r--src/lib/source/system/udev/devd-log/type1
-rw-r--r--src/lib/source/system/udev/devd-srv/dependencies.d/mount-dev0
-rw-r--r--src/lib/source/system/udev/devd-srv/no-ml0
-rw-r--r--src/lib/source/system/udev/devd-srv/producer-for1
-rw-r--r--src/lib/source/system/udev/devd-srv/run7
-rw-r--r--src/lib/source/system/udev/devd-srv/type1
-rw-r--r--src/lib/source/system/vfs/mount-dev/down9
-rw-r--r--src/lib/source/system/vfs/mount-dev/type1
-rw-r--r--src/lib/source/system/vfs/mount-dev/up7
-rw-r--r--src/lib/source/system/vfs/mount-run/down9
-rw-r--r--src/lib/source/system/vfs/mount-run/type1
-rw-r--r--src/lib/source/system/vfs/mount-run/up13
-rwxr-xr-xtools/gen-deps.sh35
-rwxr-xr-xtools/gen-targets.sh56
-rwxr-xr-xtools/install.sh69
76 files changed, 1121 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..1d835d3
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,10 @@
+Main author:
+ Paul Sopka <psopka@sopka.ch>
+
+Contributors:
+
+Thanks to:
+ Laurent Bercot <ska-skaware@skarnet.org>
+ Dan J. Bernstein <djb@cr.yp.to>
+ Paul Jarc <prj@dogmap.org>
+ Jonathan de Boyne Pollard <J.deBoynePollard@NTLWorld.com>
diff --git a/CONTRIBUTING b/CONTRIBUTING
new file mode 100644
index 0000000..6279422
--- /dev/null
+++ b/CONTRIBUTING
@@ -0,0 +1,5 @@
+ Please add a Signed-Off-By: line at the end of your commit,
+which certifies that you have the right and authority to pass
+it on as an open-source patch, as explicited in the Developer's
+Certificate of Origin available in this project's DCO file,
+or at https://developercertificate.org/
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..2dec60d
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,13 @@
+Copyright (c) 2024-2025 Paul Sopka <psopka@sopka.ch>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/DCO b/DCO
new file mode 100644
index 0000000..8201f99
--- /dev/null
+++ b/DCO
@@ -0,0 +1,37 @@
+Developer Certificate of Origin
+Version 1.1
+
+Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
+1 Letterman Drive
+Suite D4700
+San Francisco, CA, 94129
+
+Everyone is permitted to copy and distribute verbatim copies of this
+license document, but changing it is not allowed.
+
+
+Developer's Certificate of Origin 1.1
+
+By making a contribution to this project, I certify that:
+
+(a) The contribution was created in whole or in part by me and I
+ have the right to submit it under the open source license
+ indicated in the file; or
+
+(b) The contribution is based upon previous work that, to the best
+ of my knowledge, is covered under an appropriate open source
+ license and I have the right under that license to submit that
+ work with modifications, whether created in whole or in part
+ by me, under the same open source license (unless I am
+ permitted to submit under a different license), as indicated
+ in the file; or
+
+(c) The contribution was provided directly to me by some other
+ person who certified (a), (b) or (c) and I have not modified
+ it.
+
+(d) I understand and agree that this project and the contribution
+ are public and that a record of the contribution (including all
+ personal information I submit with it, including my sign-off) is
+ maintained indefinitely and may be redistributed consistent with
+ this project or the open source license(s) involved.
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..19c0276
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,83 @@
+Build Instructions
+------------------
+
+* Requirements
+ ------------
+
+ - A POSIX-compliant set of utils
+ - A set of OS specific utils
+ - s6 https://skarnet.org/software/s6/
+ - s6-rc https://skarnet.org/software/s6-rc/
+ - execline https://skarnet.org/software/execline/
+
+ This software will run on any operating system that implements
+POSIX.1-2008, available at:
+ https://pubs.opengroup.org/onlinepubs/9699919799/
+
+
+* Standard usage
+ --------------
+
+ ./configure && make && sudo make install
+
+ will work for most users.
+
+
+* Customization
+ -------------
+
+ You can customize paths via flags given to configure.
+ See ./configure --help for a list of all available configure options.
+
+* Make variables
+ --------------
+
+ You can invoke make with a few variables for more configuration.
+
+ INSTALL can be overridden on the make command line. This is
+an even bigger hammer than running ./configure with environment
+variables, so it is advised to only do this when it is the only way of
+obtaining the behaviour you want.
+
+ DESTDIR can be given on the "make install" command line in order to
+install to a staging directory.
+
+* The slashpackage convention
+ ---------------------------
+
+ The slashpackage convention (http://cr.yp.to/slashpackage.html)
+is a package installation scheme that provides a few guarantees
+over other conventions such as the FHS, for instance fixed
+absolute pathnames. skarnet.org packages support it: use the
+--enable-slashpackage option to configure, or
+--enable-slashpackage=DIR for a prefixed DIR/package tree.
+This option will activate slashpackage support during the build
+and set slashpackage-compatible installation directories.
+If $package_home is the home of the package, defined as
+DIR/package/$category/$package-$version with the variables
+read from the package/info file, then:
+
+ --bindir is set to $package_home/command
+ --sbindir is also set to $package_home/command (slashpackage
+differentiates root-only binaries by their Unix rights, not their
+location in the filesystem)
+ --libdir is set to $package_home/
+
+ --prefix is pretty much ignored when you use --enable-slashpackage.
+You should probably not use both --enable-slashpackage and --prefix.
+
+ When using slashpackage, two additional Makefile targets are
+available after "make install":
+ - "make update" changes the default version of the software to the
+freshly installed one. (This is useful when you have several installed
+versions of the same software, which slashpackage supports.)
+ - "make global-links" adds links from /command and /library.so to the
+default version of the binaries and shared libraries.
+
+
+* Out-of-tree builds
+ ------------------
+
+ This package does not support out-of-tree builds. It
+is small, so it does not cost much to duplicate the entire
+source tree if parallel builds are needed.
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..0e68c25
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,87 @@
+#
+# This makefile requires make compliant with POSIX Issue 8.
+# It also reliably works with modern GNU make.
+# Do not make changes here.
+# Use the included .mak files.
+#
+
+.POSIX:
+
+IT = conferror
+
+-include config.mak
+
+it: $(IT)
+
+conferror:
+ @echo "Please use ./configure first." ; exit 1
+
+ALL_EXTRAS ::=
+INSTALL_EXTRAS ::=
+
+-include package/extras.mak
+
+include package/targets.mak
+include package/deps.mak
+
+INSTALL ::= ./tools/install.sh
+
+all: $(ALL_BINS) $(ALL_LIBS) $(ALL_EXTRAS)
+
+clean:
+ @exec rm -rf -- $(ALL_BINS) service source bundle etc
+
+distclean: clean
+ @exec rm -f -- config.mak
+
+tgz: distclean
+ @. package/info && \
+ rm -rf /tmp/$$package-$$version && \
+ cp -a . /tmp/$$package-$$version && \
+ cd /tmp && \
+ tar -zpcv --owner=0 --group=0 --numeric-owner --exclude=.git* -f /tmp/$$package-$$version.tar.gz $$package-$$version && \
+ exec rm -rf /tmp/$$package-$$version
+
+install: $(INSTALL_BINS) $(INSTALL_LIBS) $(INSTALL_EXTRAS)
+
+$(ALL_BINS) $(ALL_LIBS):
+ @test -z $$(dirname "$@") || mkdir -p -- $$(dirname "$@")
+ exec sed \
+ -e 's/@syslogdir@/$(syslogdir)/g' \
+ -e 's/@usrlogdir@/$(usrlogdir)/g' \
+ -e 's/@logdep@/$(logdep)/g' \
+ -e 's/@logconfig@/$(logconfig)/g' \
+ -e 's/@loguser@/$(loguser)/g' \
+ -e 's/@sysconfdir@/$(sysconfdir)/g' \
+ -e 's/@usrconfdir@/$(usrconfdir)/g' \
+ -e 's/@tmpfsdir@/$(tmpfsdir)/g' \
+ -e 's/@sysrundir@/$(sysrundir)/g' \
+ -e 's/@usrrundir@/$(usrrundir)/g' \
+ -e 's/@timeout@/$(timeout)/g' \
+ -e 's/@shebangdir@/$(shebangdir)/g' \
+ -- $^ > $@
+
+$(INSTALL_BINS) $(INSTALL_LIBS):
+ exec $(INSTALL) -D -m 644 $^ $@
+ grep -F -- $^ - < package/modes | { read name mode owner && \
+ if [ x$${mode} != x ] ; then chmod $${mode} $@ ; fi && \
+ if [ x$${owner} != x ] ; then chown -- $${owner} $@ ; fi ; } || exit 0
+
+
+$(DESTDIR)$(exthome):
+ exec $(INSTALL) -D -l $(package)-$(version) $@
+
+$(SLASHCOMMAND_BINS):
+ exec $(INSTALL) -D -l $(exthome)/command/$$(basename $@) $@
+
+update: $(DESTDIR)$(exthome)
+global-links: $(SLASHCOMMAND_BINS)
+
+uninstall:
+ exec rm -f $(INSTALL_BINS) $(SLASHCOMMAND_BINS)
+ exec rm -Rf $(libdir)
+
+.PHONY: \
+ it all clean distclean tgz update global-links \
+ install uninstall \
+ $(DESTDIR)$(exthome) $(SLASHCOMMAND_BINS)
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..843464f
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,6 @@
+Changelog for goetia-base.
+
+In 0.0.0.1
+----------
+
+ - Initial release
diff --git a/configure b/configure
new file mode 100755
index 0000000..5facfc0
--- /dev/null
+++ b/configure
@@ -0,0 +1,196 @@
+#!/bin/sh
+
+cd `dirname "$0"`
+. package/info
+
+usage () {
+cat <<EOF
+Usage: $0 [OPTION]... [TARGET]
+
+Defaults for the options are specified in brackets.
+
+Installation directories:
+ --prefix=PREFIX main installation prefix [/]
+ --exec-prefix=EPREFIX installation prefix for executable files [PREFIX]
+
+Fine tuning of the installation directories:
+ --libdir=DIR service and source directories [PREFIX/lib/$package]
+ --bindir=BINDIR user executables [EPREFIX/bin]
+
+Binaries
+ --shebangdir=SHEBANGDIR dir used to find interpreters for scripts [PREFIX/bin]
+
+Logging
+ --syslogdir=LOGDIR system logdir [PREFIX/var/log/goetia]
+ --usrlogdir=LOGDIR user logdir appended to \${HOME} [.local/state/log]
+
+ --logconfig=LOGCONFIG directives for autogenerated s6-log scripts [n3 T]
+ --loguser=LOGUSER user running all system s6-log processes [logger]
+ --logdep=LOGDEP dependencies for autogenerated system s6-log processes [mount]
+
+Other
+ --sysconfdir=CONFIGDIR systemtree configdir [PREFIX/etc/goetia/system]
+ --usrconfdir=CONFIGDIR usertree configdir appended to \${HOME} [.config/goetia]
+
+ --tmpfsdir=TMPFSDIR tmpfs dir used for supervision trees [/run]
+ --sysrundir=SYSRUNDIR systemtree runtime dir appended to TMPFSDIR [system]
+ --usrrundir=USRRUNDIR usertree runtime dir appended to TMPFSDIR [user]
+
+ --timeout=TIMEOUT Timeout in ms for s6-rc invocations in init and shutdown scripts [60000]
+
+Optional features:
+ --enable-slashpackage[=ROOT] assume /package installation at ROOT [disabled]
+
+EOF
+exit 0
+}
+
+# Helper functions
+
+# If your system does not have printf, you can comment this, but it is
+# generally not a good idea to use echo.
+# See http://www.etalabs.net/sh_tricks.html
+echo () {
+ printf %s\\n "$*"
+}
+
+quote () {
+ tr '\n' ' ' <<EOF | grep '^[-[:alnum:]_=,./:]* $' >/dev/null 2>&1 && { echo "$1" ; return 0 ; }
+$1
+EOF
+ echo "$1" | sed -e "s/'/'\\\\''/g" -e "1s/^/'/" -e "\$s/\$/'/" -e "s#^'\([-[:alnum:]_,./:]*\)=\(.*\)\$#\1='\2#" -e "s|\*/|* /|g"
+}
+
+fail () {
+ echo "$*"
+ exit 1
+}
+
+fnmatch () {
+ eval "case \"\$2\" in $1) return 0 ;; *) return 1 ;; esac"
+}
+
+stripdir () {
+ while eval "fnmatch '*/' \"\${$1}\"" ; do
+ eval "$1=\${$1%/}"
+ done
+}
+
+escapeslash () {
+ echo "$1" | sed -e 's/\//\\\//g'
+}
+
+# Actual script
+
+prefix=
+exec_prefix='$prefix'
+bindir='$exec_prefix/bin'
+libdir='$prefix/lib/$package'
+
+shebangdir='$prefix/bin'
+
+syslogdir='$prefix/var/log/goetia'
+usrlogdir='.local/state/log'
+
+logconfig='n3 T'
+loguser='logger'
+logdep='mount'
+
+sysconfdir='$prefix/etc/goetia/system'
+usrconfdir='.config/goetia'
+
+tmpfsdir='$prefix/run'
+sysrundir='system'
+usrrundir='user'
+
+timeout=60000
+
+slashpackage=false
+sproot=
+home=
+exthome=
+build=
+
+for arg ; do
+ case "$arg" in
+ --help) usage ;;
+ --prefix=*) prefix=${arg#*=} ;;
+ --exec-prefix=*) exec_prefix=${arg#*=} ;;
+ --bindir=*) bindir=${arg#*=} ;;
+ --libdir=*) libdir=${arg#*=} ;;
+ --shebangdir=*) shebangdir=${arg#*=} ;;
+ --syslogdir=*) syslogdir=${arg#*=} ;;
+ --usrlogdir=*) usrlogdir=${arg#*=} ;;
+ --logconfig=*) logconfig=${arg#*=} ;;
+ --loguser=*) loguser=${arg#*=} ;;
+ --logdep=*) logdep=${arg#*=} ;;
+ --sysconfdir=*) sysconfdir=${arg#*=} ;;
+ --usrconfdir=*) usrconfdir=${arg#*=} ;;
+ --tmpfsdir=*) tmpfsdir=${arg#*=} ;;
+ --sysrundir=*) sysrundir=${arg#*=} ;;
+ --usrrundir=*) usrrundir=${arg#*=} ;;
+ --timeout=*) timeout=${arg#*=} ;;
+ --enable-slashpackage=*) sproot=${arg#*=} ; slashpackage=true ; ;;
+ --enable-slashpackage) sproot= ; slashpackage=true ;;
+ --disable-slashpackage) sproot= ; installtype=fhs ;;
+ --enable-*|--disable-*|--with-*|--without-*|--*dir=*) ;;
+ -* ) echo "$0: unknown option $arg" ;;
+ *=*) eval "${arg%%=*}=\${arg#*=}" ;;
+ *) target=$arg ;;
+ esac
+done
+
+# Expand installation directories
+stripdir prefix
+for i in exec_prefix bindir libdir shebangdir syslogdir usrlogdir sysconfdir usrconfdir tmpfsdir sysrundir usrrundir sproot ; do
+ eval tmp=\${$i}
+ eval $i=$tmp
+ stripdir $i
+done
+
+# Set slashpackage values
+if $slashpackage ; then
+ home=${sproot}/package/${category}/${package}-${version}
+ exthome=${sproot}/package/${category}/${package}
+ extbinprefix=${exthome}/command
+ bindir=${home}/command
+ libdir=${home}
+fi
+
+echo "Creating config.mak..."
+cmdline=$(quote "$0")
+for i ; do cmdline="$cmdline $(quote "$i")" ; done
+exec 3>&1 1>config.mak
+cat << EOF
+# This file was generated by:
+# $cmdline
+# Any changes made here will be lost if configure is re-run.
+
+IT ::= all
+
+package ::= $package
+prefix ::= $prefix
+exec_prefix ::= $exec_prefix
+bindir ::= $bindir
+libdir ::= $libdir
+shebangdir ::= $(escapeslash "$shebangdir")
+syslogdir ::= $(escapeslash "$syslogdir")
+usrlogdir ::= $(escapeslash "$usrlogdir")
+logconfig ::= $(escapeslash "$logconfig")
+loguser ::= $(escapeslash "$loguser")
+logdep ::= $(escapeslash "$logdep")
+sysconfdir ::= $(escapeslash "$sysconfdir")
+usrconfdir ::= $(escapeslash "$usrconfdir")
+tmpfsdir ::= $(escapeslash "$tmpfsdir")
+sysrundir ::= $(escapeslash "$sysrundir")
+usrrundir ::= $(escapeslash "$usrrundir")
+timeout ::= $timeout
+slashpackage ::= $slashpackage
+sproot ::= $sproot
+version ::= $version
+home ::= $home
+exthome ::= $exthome
+EOF
+
+exec 1>&3 3>&-
+echo " ... done."
diff --git a/package/deps.mak b/package/deps.mak
new file mode 100644
index 0000000..fb9d5c3
--- /dev/null
+++ b/package/deps.mak
@@ -0,0 +1,126 @@
+#
+# This file has been generated by tools/gen-deps.sh
+#
+
+service/system/getty-12/run: src/lib/service/system/getty-12/run
+$(DESTDIR)$(libdir)/service/system/getty-12/run: service/system/getty-12/run
+source/system/other/syslog-priv-srv/run: src/lib/source/system/other/syslog-priv-srv/run
+$(DESTDIR)$(libdir)/source/system/other/syslog-priv-srv/run: source/system/other/syslog-priv-srv/run
+source/system/other/syslog-priv-srv/type: src/lib/source/system/other/syslog-priv-srv/type
+$(DESTDIR)$(libdir)/source/system/other/syslog-priv-srv/type: source/system/other/syslog-priv-srv/type
+source/system/other/syslog-priv-srv/notification-fd: src/lib/source/system/other/syslog-priv-srv/notification-fd
+$(DESTDIR)$(libdir)/source/system/other/syslog-priv-srv/notification-fd: source/system/other/syslog-priv-srv/notification-fd
+source/system/other/syslog-priv-srv/dependencies.d/mount: src/lib/source/system/other/syslog-priv-srv/dependencies.d/mount
+$(DESTDIR)$(libdir)/source/system/other/syslog-priv-srv/dependencies.d/mount: source/system/other/syslog-priv-srv/dependencies.d/mount
+source/system/other/syslog-priv-srv/producer-for: src/lib/source/system/other/syslog-priv-srv/producer-for
+$(DESTDIR)$(libdir)/source/system/other/syslog-priv-srv/producer-for: source/system/other/syslog-priv-srv/producer-for
+source/system/other/random-seed-load/up: src/lib/source/system/other/random-seed-load/up
+$(DESTDIR)$(libdir)/source/system/other/random-seed-load/up: source/system/other/random-seed-load/up
+source/system/other/random-seed-load/type: src/lib/source/system/other/random-seed-load/type
+$(DESTDIR)$(libdir)/source/system/other/random-seed-load/type: source/system/other/random-seed-load/type
+source/system/other/random-seed-load/dependencies.d/mount-dev: src/lib/source/system/other/random-seed-load/dependencies.d/mount-dev
+$(DESTDIR)$(libdir)/source/system/other/random-seed-load/dependencies.d/mount-dev: source/system/other/random-seed-load/dependencies.d/mount-dev
+source/system/other/swap-fstab/up: src/lib/source/system/other/swap-fstab/up
+$(DESTDIR)$(libdir)/source/system/other/swap-fstab/up: source/system/other/swap-fstab/up
+source/system/other/swap-fstab/type: src/lib/source/system/other/swap-fstab/type
+$(DESTDIR)$(libdir)/source/system/other/swap-fstab/type: source/system/other/swap-fstab/type
+source/system/other/swap-fstab/down: src/lib/source/system/other/swap-fstab/down
+$(DESTDIR)$(libdir)/source/system/other/swap-fstab/down: source/system/other/swap-fstab/down
+source/system/other/random-seed-save/up: src/lib/source/system/other/random-seed-save/up
+$(DESTDIR)$(libdir)/source/system/other/random-seed-save/up: source/system/other/random-seed-save/up
+source/system/other/random-seed-save/type: src/lib/source/system/other/random-seed-save/type
+$(DESTDIR)$(libdir)/source/system/other/random-seed-save/type: source/system/other/random-seed-save/type
+source/system/other/random-seed-save/down: src/lib/source/system/other/random-seed-save/down
+$(DESTDIR)$(libdir)/source/system/other/random-seed-save/down: source/system/other/random-seed-save/down
+source/system/other/random-seed-save/dependencies.d/mount-dev: src/lib/source/system/other/random-seed-save/dependencies.d/mount-dev
+$(DESTDIR)$(libdir)/source/system/other/random-seed-save/dependencies.d/mount-dev: source/system/other/random-seed-save/dependencies.d/mount-dev
+source/system/other/random-seed-save/dependencies.d/random-seed-load: src/lib/source/system/other/random-seed-save/dependencies.d/random-seed-load
+$(DESTDIR)$(libdir)/source/system/other/random-seed-save/dependencies.d/random-seed-load: source/system/other/random-seed-save/dependencies.d/random-seed-load
+source/system/other/random-seed-save/dependencies.d/mount: src/lib/source/system/other/random-seed-save/dependencies.d/mount
+$(DESTDIR)$(libdir)/source/system/other/random-seed-save/dependencies.d/mount: source/system/other/random-seed-save/dependencies.d/mount
+source/system/other/syslog-srv/run: src/lib/source/system/other/syslog-srv/run
+$(DESTDIR)$(libdir)/source/system/other/syslog-srv/run: source/system/other/syslog-srv/run
+source/system/other/syslog-srv/type: src/lib/source/system/other/syslog-srv/type
+$(DESTDIR)$(libdir)/source/system/other/syslog-srv/type: source/system/other/syslog-srv/type
+source/system/other/syslog-srv/notification-fd: src/lib/source/system/other/syslog-srv/notification-fd
+$(DESTDIR)$(libdir)/source/system/other/syslog-srv/notification-fd: source/system/other/syslog-srv/notification-fd
+source/system/other/syslog-srv/dependencies.d/mount: src/lib/source/system/other/syslog-srv/dependencies.d/mount
+$(DESTDIR)$(libdir)/source/system/other/syslog-srv/dependencies.d/mount: source/system/other/syslog-srv/dependencies.d/mount
+source/system/other/syslog-srv/producer-for: src/lib/source/system/other/syslog-srv/producer-for
+$(DESTDIR)$(libdir)/source/system/other/syslog-srv/producer-for: source/system/other/syslog-srv/producer-for
+source/system/other/modules/up: src/lib/source/system/other/modules/up
+$(DESTDIR)$(libdir)/source/system/other/modules/up: source/system/other/modules/up
+source/system/other/modules/type: src/lib/source/system/other/modules/type
+$(DESTDIR)$(libdir)/source/system/other/modules/type: source/system/other/modules/type
+source/system/other/dmesg-srv/run: src/lib/source/system/other/dmesg-srv/run
+$(DESTDIR)$(libdir)/source/system/other/dmesg-srv/run: source/system/other/dmesg-srv/run
+source/system/other/dmesg-srv/type: src/lib/source/system/other/dmesg-srv/type
+$(DESTDIR)$(libdir)/source/system/other/dmesg-srv/type: source/system/other/dmesg-srv/type
+source/system/other/dmesg-srv/dependencies.d/mount-dev: src/lib/source/system/other/dmesg-srv/dependencies.d/mount-dev
+$(DESTDIR)$(libdir)/source/system/other/dmesg-srv/dependencies.d/mount-dev: source/system/other/dmesg-srv/dependencies.d/mount-dev
+source/system/other/dmesg-srv/producer-for: src/lib/source/system/other/dmesg-srv/producer-for
+$(DESTDIR)$(libdir)/source/system/other/dmesg-srv/producer-for: source/system/other/dmesg-srv/producer-for
+source/system/other/local/up: src/lib/source/system/other/local/up
+$(DESTDIR)$(libdir)/source/system/other/local/up: source/system/other/local/up
+source/system/other/local/type: src/lib/source/system/other/local/type
+$(DESTDIR)$(libdir)/source/system/other/local/type: source/system/other/local/type
+source/system/other/local/down: src/lib/source/system/other/local/down
+$(DESTDIR)$(libdir)/source/system/other/local/down: source/system/other/local/down
+source/system/udev/devd-srv/run: src/lib/source/system/udev/devd-srv/run
+$(DESTDIR)$(libdir)/source/system/udev/devd-srv/run: source/system/udev/devd-srv/run
+source/system/udev/devd-srv/type: src/lib/source/system/udev/devd-srv/type
+$(DESTDIR)$(libdir)/source/system/udev/devd-srv/type: source/system/udev/devd-srv/type
+source/system/udev/devd-srv/dependencies.d/mount-dev: src/lib/source/system/udev/devd-srv/dependencies.d/mount-dev
+$(DESTDIR)$(libdir)/source/system/udev/devd-srv/dependencies.d/mount-dev: source/system/udev/devd-srv/dependencies.d/mount-dev
+source/system/udev/devd-srv/producer-for: src/lib/source/system/udev/devd-srv/producer-for
+$(DESTDIR)$(libdir)/source/system/udev/devd-srv/producer-for: source/system/udev/devd-srv/producer-for
+source/system/udev/devd-srv/no-ml: src/lib/source/system/udev/devd-srv/no-ml
+$(DESTDIR)$(libdir)/source/system/udev/devd-srv/no-ml: source/system/udev/devd-srv/no-ml
+source/system/udev/devd-log/run: src/lib/source/system/udev/devd-log/run
+$(DESTDIR)$(libdir)/source/system/udev/devd-log/run: source/system/udev/devd-log/run
+source/system/udev/devd-log/consumer-for: src/lib/source/system/udev/devd-log/consumer-for
+$(DESTDIR)$(libdir)/source/system/udev/devd-log/consumer-for: source/system/udev/devd-log/consumer-for
+source/system/udev/devd-log/type: src/lib/source/system/udev/devd-log/type
+$(DESTDIR)$(libdir)/source/system/udev/devd-log/type: source/system/udev/devd-log/type
+source/system/udev/devd-log/pipeline-name: src/lib/source/system/udev/devd-log/pipeline-name
+$(DESTDIR)$(libdir)/source/system/udev/devd-log/pipeline-name: source/system/udev/devd-log/pipeline-name
+source/system/udev/devd-log/notification-fd: src/lib/source/system/udev/devd-log/notification-fd
+$(DESTDIR)$(libdir)/source/system/udev/devd-log/notification-fd: source/system/udev/devd-log/notification-fd
+source/system/udev/devd-log/no-ml: src/lib/source/system/udev/devd-log/no-ml
+$(DESTDIR)$(libdir)/source/system/udev/devd-log/no-ml: source/system/udev/devd-log/no-ml
+source/system/net/hostname/up: src/lib/source/system/net/hostname/up
+$(DESTDIR)$(libdir)/source/system/net/hostname/up: source/system/net/hostname/up
+source/system/net/hostname/type: src/lib/source/system/net/hostname/type
+$(DESTDIR)$(libdir)/source/system/net/hostname/type: source/system/net/hostname/type
+source/system/mount/mount-tmp/up: src/lib/source/system/mount/mount-tmp/up
+$(DESTDIR)$(libdir)/source/system/mount/mount-tmp/up: source/system/mount/mount-tmp/up
+source/system/mount/mount-tmp/type: src/lib/source/system/mount/mount-tmp/type
+$(DESTDIR)$(libdir)/source/system/mount/mount-tmp/type: source/system/mount/mount-tmp/type
+source/system/mount/mount-tmp/down: src/lib/source/system/mount/mount-tmp/down
+$(DESTDIR)$(libdir)/source/system/mount/mount-tmp/down: source/system/mount/mount-tmp/down
+source/system/mount/remount-root/up: src/lib/source/system/mount/remount-root/up
+$(DESTDIR)$(libdir)/source/system/mount/remount-root/up: source/system/mount/remount-root/up
+source/system/mount/remount-root/type: src/lib/source/system/mount/remount-root/type
+$(DESTDIR)$(libdir)/source/system/mount/remount-root/type: source/system/mount/remount-root/type
+source/system/mount/remount-root/down: src/lib/source/system/mount/remount-root/down
+$(DESTDIR)$(libdir)/source/system/mount/remount-root/down: source/system/mount/remount-root/down
+source/system/mount/mount-fstab/up: src/lib/source/system/mount/mount-fstab/up
+$(DESTDIR)$(libdir)/source/system/mount/mount-fstab/up: source/system/mount/mount-fstab/up
+source/system/mount/mount-fstab/type: src/lib/source/system/mount/mount-fstab/type
+$(DESTDIR)$(libdir)/source/system/mount/mount-fstab/type: source/system/mount/mount-fstab/type
+source/system/mount/mount-fstab/down: src/lib/source/system/mount/mount-fstab/down
+$(DESTDIR)$(libdir)/source/system/mount/mount-fstab/down: source/system/mount/mount-fstab/down
+source/system/mount/mount-fstab/dependencies.d/mount-dev: src/lib/source/system/mount/mount-fstab/dependencies.d/mount-dev
+$(DESTDIR)$(libdir)/source/system/mount/mount-fstab/dependencies.d/mount-dev: source/system/mount/mount-fstab/dependencies.d/mount-dev
+source/system/vfs/mount-dev/up: src/lib/source/system/vfs/mount-dev/up
+$(DESTDIR)$(libdir)/source/system/vfs/mount-dev/up: source/system/vfs/mount-dev/up
+source/system/vfs/mount-dev/type: src/lib/source/system/vfs/mount-dev/type
+$(DESTDIR)$(libdir)/source/system/vfs/mount-dev/type: source/system/vfs/mount-dev/type
+source/system/vfs/mount-dev/down: src/lib/source/system/vfs/mount-dev/down
+$(DESTDIR)$(libdir)/source/system/vfs/mount-dev/down: source/system/vfs/mount-dev/down
+source/system/vfs/mount-run/up: src/lib/source/system/vfs/mount-run/up
+$(DESTDIR)$(libdir)/source/system/vfs/mount-run/up: source/system/vfs/mount-run/up
+source/system/vfs/mount-run/type: src/lib/source/system/vfs/mount-run/type
+$(DESTDIR)$(libdir)/source/system/vfs/mount-run/type: source/system/vfs/mount-run/type
+source/system/vfs/mount-run/down: src/lib/source/system/vfs/mount-run/down
+$(DESTDIR)$(libdir)/source/system/vfs/mount-run/down: source/system/vfs/mount-run/down
diff --git a/package/info b/package/info
new file mode 100644
index 0000000..fe25618
--- /dev/null
+++ b/package/info
@@ -0,0 +1,4 @@
+package=goetia-freebsd
+version=0.0.0.1
+category=admin
+package_macro_name=GOETIA-FREEBSD
diff --git a/package/modes b/package/modes
new file mode 100644
index 0000000..515ca2e
--- /dev/null
+++ b/package/modes
@@ -0,0 +1 @@
+service/system/getty-12/run 0755
diff --git a/package/targets.mak b/package/targets.mak
new file mode 100644
index 0000000..c552c6c
--- /dev/null
+++ b/package/targets.mak
@@ -0,0 +1,130 @@
+#
+# This file has been generated by tools/gen-targets.sh
+#
+
+ALL_LIBS ::= \
+ service/system/getty-12/run \
+ source/system/other/syslog-priv-srv/run \
+ source/system/other/syslog-priv-srv/type \
+ source/system/other/syslog-priv-srv/notification-fd \
+ source/system/other/syslog-priv-srv/dependencies.d/mount \
+ source/system/other/syslog-priv-srv/producer-for \
+ source/system/other/random-seed-load/up \
+ source/system/other/random-seed-load/type \
+ source/system/other/random-seed-load/dependencies.d/mount-dev \
+ source/system/other/swap-fstab/up \
+ source/system/other/swap-fstab/type \
+ source/system/other/swap-fstab/down \
+ source/system/other/random-seed-save/up \
+ source/system/other/random-seed-save/type \
+ source/system/other/random-seed-save/down \
+ source/system/other/random-seed-save/dependencies.d/mount-dev \
+ source/system/other/random-seed-save/dependencies.d/random-seed-load \
+ source/system/other/random-seed-save/dependencies.d/mount \
+ source/system/other/syslog-srv/run \
+ source/system/other/syslog-srv/type \
+ source/system/other/syslog-srv/notification-fd \
+ source/system/other/syslog-srv/dependencies.d/mount \
+ source/system/other/syslog-srv/producer-for \
+ source/system/other/modules/up \
+ source/system/other/modules/type \
+ source/system/other/dmesg-srv/run \
+ source/system/other/dmesg-srv/type \
+ source/system/other/dmesg-srv/dependencies.d/mount-dev \
+ source/system/other/dmesg-srv/producer-for \
+ source/system/other/local/up \
+ source/system/other/local/type \
+ source/system/other/local/down \
+ source/system/udev/devd-srv/run \
+ source/system/udev/devd-srv/type \
+ source/system/udev/devd-srv/dependencies.d/mount-dev \
+ source/system/udev/devd-srv/producer-for \
+ source/system/udev/devd-srv/no-ml \
+ source/system/udev/devd-log/run \
+ source/system/udev/devd-log/consumer-for \
+ source/system/udev/devd-log/type \
+ source/system/udev/devd-log/pipeline-name \
+ source/system/udev/devd-log/notification-fd \
+ source/system/udev/devd-log/no-ml \
+ source/system/net/hostname/up \
+ source/system/net/hostname/type \
+ source/system/mount/mount-tmp/up \
+ source/system/mount/mount-tmp/type \
+ source/system/mount/mount-tmp/down \
+ source/system/mount/remount-root/up \
+ source/system/mount/remount-root/type \
+ source/system/mount/remount-root/down \
+ source/system/mount/mount-fstab/up \
+ source/system/mount/mount-fstab/type \
+ source/system/mount/mount-fstab/down \
+ source/system/mount/mount-fstab/dependencies.d/mount-dev \
+ source/system/vfs/mount-dev/up \
+ source/system/vfs/mount-dev/type \
+ source/system/vfs/mount-dev/down \
+ source/system/vfs/mount-run/up \
+ source/system/vfs/mount-run/type \
+ source/system/vfs/mount-run/down \
+
+INSTALL_LIBS ::= \
+ $(DESTDIR)$(libdir)/service/system/getty-12/run \
+ $(DESTDIR)$(libdir)/source/system/other/syslog-priv-srv/run \
+ $(DESTDIR)$(libdir)/source/system/other/syslog-priv-srv/type \
+ $(DESTDIR)$(libdir)/source/system/other/syslog-priv-srv/notification-fd \
+ $(DESTDIR)$(libdir)/source/system/other/syslog-priv-srv/dependencies.d/mount \
+ $(DESTDIR)$(libdir)/source/system/other/syslog-priv-srv/producer-for \
+ $(DESTDIR)$(libdir)/source/system/other/random-seed-load/up \
+ $(DESTDIR)$(libdir)/source/system/other/random-seed-load/type \
+ $(DESTDIR)$(libdir)/source/system/other/random-seed-load/dependencies.d/mount-dev \
+ $(DESTDIR)$(libdir)/source/system/other/swap-fstab/up \
+ $(DESTDIR)$(libdir)/source/system/other/swap-fstab/type \
+ $(DESTDIR)$(libdir)/source/system/other/swap-fstab/down \
+ $(DESTDIR)$(libdir)/source/system/other/random-seed-save/up \
+ $(DESTDIR)$(libdir)/source/system/other/random-seed-save/type \
+ $(DESTDIR)$(libdir)/source/system/other/random-seed-save/down \
+ $(DESTDIR)$(libdir)/source/system/other/random-seed-save/dependencies.d/mount-dev \
+ $(DESTDIR)$(libdir)/source/system/other/random-seed-save/dependencies.d/random-seed-load \
+ $(DESTDIR)$(libdir)/source/system/other/random-seed-save/dependencies.d/mount \
+ $(DESTDIR)$(libdir)/source/system/other/syslog-srv/run \
+ $(DESTDIR)$(libdir)/source/system/other/syslog-srv/type \
+ $(DESTDIR)$(libdir)/source/system/other/syslog-srv/notification-fd \
+ $(DESTDIR)$(libdir)/source/system/other/syslog-srv/dependencies.d/mount \
+ $(DESTDIR)$(libdir)/source/system/other/syslog-srv/producer-for \
+ $(DESTDIR)$(libdir)/source/system/other/modules/up \
+ $(DESTDIR)$(libdir)/source/system/other/modules/type \
+ $(DESTDIR)$(libdir)/source/system/other/dmesg-srv/run \
+ $(DESTDIR)$(libdir)/source/system/other/dmesg-srv/type \
+ $(DESTDIR)$(libdir)/source/system/other/dmesg-srv/dependencies.d/mount-dev \
+ $(DESTDIR)$(libdir)/source/system/other/dmesg-srv/producer-for \
+ $(DESTDIR)$(libdir)/source/system/other/local/up \
+ $(DESTDIR)$(libdir)/source/system/other/local/type \
+ $(DESTDIR)$(libdir)/source/system/other/local/down \
+ $(DESTDIR)$(libdir)/source/system/udev/devd-srv/run \
+ $(DESTDIR)$(libdir)/source/system/udev/devd-srv/type \
+ $(DESTDIR)$(libdir)/source/system/udev/devd-srv/dependencies.d/mount-dev \
+ $(DESTDIR)$(libdir)/source/system/udev/devd-srv/producer-for \
+ $(DESTDIR)$(libdir)/source/system/udev/devd-srv/no-ml \
+ $(DESTDIR)$(libdir)/source/system/udev/devd-log/run \
+ $(DESTDIR)$(libdir)/source/system/udev/devd-log/consumer-for \
+ $(DESTDIR)$(libdir)/source/system/udev/devd-log/type \
+ $(DESTDIR)$(libdir)/source/system/udev/devd-log/pipeline-name \
+ $(DESTDIR)$(libdir)/source/system/udev/devd-log/notification-fd \
+ $(DESTDIR)$(libdir)/source/system/udev/devd-log/no-ml \
+ $(DESTDIR)$(libdir)/source/system/net/hostname/up \
+ $(DESTDIR)$(libdir)/source/system/net/hostname/type \
+ $(DESTDIR)$(libdir)/source/system/mount/mount-tmp/up \
+ $(DESTDIR)$(libdir)/source/system/mount/mount-tmp/type \
+ $(DESTDIR)$(libdir)/source/system/mount/mount-tmp/down \
+ $(DESTDIR)$(libdir)/source/system/mount/remount-root/up \
+ $(DESTDIR)$(libdir)/source/system/mount/remount-root/type \
+ $(DESTDIR)$(libdir)/source/system/mount/remount-root/down \
+ $(DESTDIR)$(libdir)/source/system/mount/mount-fstab/up \
+ $(DESTDIR)$(libdir)/source/system/mount/mount-fstab/type \
+ $(DESTDIR)$(libdir)/source/system/mount/mount-fstab/down \
+ $(DESTDIR)$(libdir)/source/system/mount/mount-fstab/dependencies.d/mount-dev \
+ $(DESTDIR)$(libdir)/source/system/vfs/mount-dev/up \
+ $(DESTDIR)$(libdir)/source/system/vfs/mount-dev/type \
+ $(DESTDIR)$(libdir)/source/system/vfs/mount-dev/down \
+ $(DESTDIR)$(libdir)/source/system/vfs/mount-run/up \
+ $(DESTDIR)$(libdir)/source/system/vfs/mount-run/type \
+ $(DESTDIR)$(libdir)/source/system/vfs/mount-run/down \
+
diff --git a/src/lib/service/system/getty-12/run b/src/lib/service/system/getty-12/run
new file mode 100755
index 0000000..7e96a99
--- /dev/null
+++ b/src/lib/service/system/getty-12/run
@@ -0,0 +1,5 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+getty Pc ttyvb
diff --git a/src/lib/source/system/mount/mount-fstab/dependencies.d/mount-dev b/src/lib/source/system/mount/mount-fstab/dependencies.d/mount-dev
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/lib/source/system/mount/mount-fstab/dependencies.d/mount-dev
diff --git a/src/lib/source/system/mount/mount-fstab/down b/src/lib/source/system/mount/mount-fstab/down
new file mode 100644
index 0000000..794c607
--- /dev/null
+++ b/src/lib/source/system/mount/mount-fstab/down
@@ -0,0 +1,7 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+fdmove -c 2 1
+
+umount -a
diff --git a/src/lib/source/system/mount/mount-fstab/type b/src/lib/source/system/mount/mount-fstab/type
new file mode 100644
index 0000000..bdd22a1
--- /dev/null
+++ b/src/lib/source/system/mount/mount-fstab/type
@@ -0,0 +1 @@
+oneshot
diff --git a/src/lib/source/system/mount/mount-fstab/up b/src/lib/source/system/mount/mount-fstab/up
new file mode 100644
index 0000000..e0bce06
--- /dev/null
+++ b/src/lib/source/system/mount/mount-fstab/up
@@ -0,0 +1,7 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+fdmove -c 2 1
+
+mount -a
diff --git a/src/lib/source/system/mount/mount-tmp/down b/src/lib/source/system/mount/mount-tmp/down
new file mode 100644
index 0000000..106ff1f
--- /dev/null
+++ b/src/lib/source/system/mount/mount-tmp/down
@@ -0,0 +1,8 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+#fdmove -c 2 1
+
+# Not umounting since it is used until shutdown anyway
+# umount /tmp
diff --git a/src/lib/source/system/mount/mount-tmp/type b/src/lib/source/system/mount/mount-tmp/type
new file mode 100644
index 0000000..bdd22a1
--- /dev/null
+++ b/src/lib/source/system/mount/mount-tmp/type
@@ -0,0 +1 @@
+oneshot
diff --git a/src/lib/source/system/mount/mount-tmp/up b/src/lib/source/system/mount/mount-tmp/up
new file mode 100644
index 0000000..1474e2f
--- /dev/null
+++ b/src/lib/source/system/mount/mount-tmp/up
@@ -0,0 +1,7 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+fdmove -c 2 1
+
+mount -t tmpfs -o mode=1777 tmpfs /tmp
diff --git a/src/lib/source/system/mount/remount-root/down b/src/lib/source/system/mount/remount-root/down
new file mode 100644
index 0000000..36356fe
--- /dev/null
+++ b/src/lib/source/system/mount/remount-root/down
@@ -0,0 +1,7 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+fdmove -c 2 1
+
+mount -ur /
diff --git a/src/lib/source/system/mount/remount-root/type b/src/lib/source/system/mount/remount-root/type
new file mode 100644
index 0000000..bdd22a1
--- /dev/null
+++ b/src/lib/source/system/mount/remount-root/type
@@ -0,0 +1 @@
+oneshot
diff --git a/src/lib/source/system/mount/remount-root/up b/src/lib/source/system/mount/remount-root/up
new file mode 100644
index 0000000..e57f468
--- /dev/null
+++ b/src/lib/source/system/mount/remount-root/up
@@ -0,0 +1,7 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+fdmove -c 2 1
+
+mount -uw /
diff --git a/src/lib/source/system/net/hostname/type b/src/lib/source/system/net/hostname/type
new file mode 100644
index 0000000..bdd22a1
--- /dev/null
+++ b/src/lib/source/system/net/hostname/type
@@ -0,0 +1 @@
+oneshot
diff --git a/src/lib/source/system/net/hostname/up b/src/lib/source/system/net/hostname/up
new file mode 100644
index 0000000..42ff083
--- /dev/null
+++ b/src/lib/source/system/net/hostname/up
@@ -0,0 +1,9 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+fdmove -c 2 1
+
+backtick -Ei HOSTNAME { head -n 1 /etc/hostname }
+
+hostname ${HOSTNAME}
diff --git a/src/lib/source/system/other/dmesg-srv/dependencies.d/mount-dev b/src/lib/source/system/other/dmesg-srv/dependencies.d/mount-dev
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/lib/source/system/other/dmesg-srv/dependencies.d/mount-dev
diff --git a/src/lib/source/system/other/dmesg-srv/producer-for b/src/lib/source/system/other/dmesg-srv/producer-for
new file mode 100644
index 0000000..83a6f9a
--- /dev/null
+++ b/src/lib/source/system/other/dmesg-srv/producer-for
@@ -0,0 +1 @@
+dmesg-log
diff --git a/src/lib/source/system/other/dmesg-srv/run b/src/lib/source/system/other/dmesg-srv/run
new file mode 100644
index 0000000..be2c183
--- /dev/null
+++ b/src/lib/source/system/other/dmesg-srv/run
@@ -0,0 +1,10 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+# https://skarnet.org/software/s6/
+
+fdmove -c 2 1
+
+redirfd -r 0 /dev/klog
+
+ucspilogd
diff --git a/src/lib/source/system/other/dmesg-srv/type b/src/lib/source/system/other/dmesg-srv/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/src/lib/source/system/other/dmesg-srv/type
@@ -0,0 +1 @@
+longrun
diff --git a/src/lib/source/system/other/local/down b/src/lib/source/system/other/local/down
new file mode 100644
index 0000000..0a47f3d
--- /dev/null
+++ b/src/lib/source/system/other/local/down
@@ -0,0 +1,8 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+elglob -0 SCRIPTS /etc/local.d/*.down
+
+forx -pE SCRIPT { ${SCRIPTS} }
+ ${SCRIPT}
diff --git a/src/lib/source/system/other/local/type b/src/lib/source/system/other/local/type
new file mode 100644
index 0000000..bdd22a1
--- /dev/null
+++ b/src/lib/source/system/other/local/type
@@ -0,0 +1 @@
+oneshot
diff --git a/src/lib/source/system/other/local/up b/src/lib/source/system/other/local/up
new file mode 100644
index 0000000..3a553ff
--- /dev/null
+++ b/src/lib/source/system/other/local/up
@@ -0,0 +1,10 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+fdmove -c 2 1
+
+elglob -0 SCRIPTS /etc/local.d/*.up
+
+forx -pE SCRIPT { ${SCRIPTS} }
+ ${SCRIPT}
diff --git a/src/lib/source/system/other/modules/type b/src/lib/source/system/other/modules/type
new file mode 100644
index 0000000..bdd22a1
--- /dev/null
+++ b/src/lib/source/system/other/modules/type
@@ -0,0 +1 @@
+oneshot
diff --git a/src/lib/source/system/other/modules/up b/src/lib/source/system/other/modules/up
new file mode 100644
index 0000000..67edc94
--- /dev/null
+++ b/src/lib/source/system/other/modules/up
@@ -0,0 +1,19 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+fdmove -c 2 1
+
+elglob -0sd'' FILES /etc/modules-load.d/*
+if -x0 { eltest ${FILES} }
+define -sd'' SPLITFILES ${FILES}
+pipeline { cat ${SPLITFILES} }
+pipeline {
+ sed
+ -e "/^#/d"
+ -e "s/^[\ \t]*//g"
+ -e "s/[\ \t]*$//g"
+ -e "/^$/d"
+}
+forstdin -pE MODULE
+ kldload ${MODULE}
diff --git a/src/lib/source/system/other/random-seed-load/dependencies.d/mount-dev b/src/lib/source/system/other/random-seed-load/dependencies.d/mount-dev
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/lib/source/system/other/random-seed-load/dependencies.d/mount-dev
diff --git a/src/lib/source/system/other/random-seed-load/type b/src/lib/source/system/other/random-seed-load/type
new file mode 100644
index 0000000..bdd22a1
--- /dev/null
+++ b/src/lib/source/system/other/random-seed-load/type
@@ -0,0 +1 @@
+oneshot
diff --git a/src/lib/source/system/other/random-seed-load/up b/src/lib/source/system/other/random-seed-load/up
new file mode 100644
index 0000000..c5b3868
--- /dev/null
+++ b/src/lib/source/system/other/random-seed-load/up
@@ -0,0 +1,12 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+fdmove -c 2 1
+
+redirfd -a 2 /dev/null
+
+if -x0 { eltest -e /var/lib/rngseed }
+dd if=/var/lib/rngseed
+ of=/dev/random
+ bs=4096
diff --git a/src/lib/source/system/other/random-seed-save/dependencies.d/mount b/src/lib/source/system/other/random-seed-save/dependencies.d/mount
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/lib/source/system/other/random-seed-save/dependencies.d/mount
diff --git a/src/lib/source/system/other/random-seed-save/dependencies.d/mount-dev b/src/lib/source/system/other/random-seed-save/dependencies.d/mount-dev
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/lib/source/system/other/random-seed-save/dependencies.d/mount-dev
diff --git a/src/lib/source/system/other/random-seed-save/dependencies.d/random-seed-load b/src/lib/source/system/other/random-seed-save/dependencies.d/random-seed-load
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/lib/source/system/other/random-seed-save/dependencies.d/random-seed-load
diff --git a/src/lib/source/system/other/random-seed-save/down b/src/lib/source/system/other/random-seed-save/down
new file mode 100644
index 0000000..f560f3c
--- /dev/null
+++ b/src/lib/source/system/other/random-seed-save/down
@@ -0,0 +1,14 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+fdmove -c 2 1
+
+umask 377
+
+redirfd -a 2 /dev/null
+
+dd if=/dev/random
+ of=/var/lib/rngseed
+ count=1
+ bs=4096
diff --git a/src/lib/source/system/other/random-seed-save/type b/src/lib/source/system/other/random-seed-save/type
new file mode 100644
index 0000000..bdd22a1
--- /dev/null
+++ b/src/lib/source/system/other/random-seed-save/type
@@ -0,0 +1 @@
+oneshot
diff --git a/src/lib/source/system/other/random-seed-save/up b/src/lib/source/system/other/random-seed-save/up
new file mode 100644
index 0000000..f560f3c
--- /dev/null
+++ b/src/lib/source/system/other/random-seed-save/up
@@ -0,0 +1,14 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+fdmove -c 2 1
+
+umask 377
+
+redirfd -a 2 /dev/null
+
+dd if=/dev/random
+ of=/var/lib/rngseed
+ count=1
+ bs=4096
diff --git a/src/lib/source/system/other/swap-fstab/down b/src/lib/source/system/other/swap-fstab/down
new file mode 100644
index 0000000..a6b3be3
--- /dev/null
+++ b/src/lib/source/system/other/swap-fstab/down
@@ -0,0 +1,7 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+fdmove -c 2 1
+
+swapoff -aq
diff --git a/src/lib/source/system/other/swap-fstab/type b/src/lib/source/system/other/swap-fstab/type
new file mode 100644
index 0000000..bdd22a1
--- /dev/null
+++ b/src/lib/source/system/other/swap-fstab/type
@@ -0,0 +1 @@
+oneshot
diff --git a/src/lib/source/system/other/swap-fstab/up b/src/lib/source/system/other/swap-fstab/up
new file mode 100644
index 0000000..b10e29e
--- /dev/null
+++ b/src/lib/source/system/other/swap-fstab/up
@@ -0,0 +1,7 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+fdmove -c 2 1
+
+swapon -aq
diff --git a/src/lib/source/system/other/syslog-priv-srv/dependencies.d/mount b/src/lib/source/system/other/syslog-priv-srv/dependencies.d/mount
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/lib/source/system/other/syslog-priv-srv/dependencies.d/mount
diff --git a/src/lib/source/system/other/syslog-priv-srv/notification-fd b/src/lib/source/system/other/syslog-priv-srv/notification-fd
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/src/lib/source/system/other/syslog-priv-srv/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/src/lib/source/system/other/syslog-priv-srv/producer-for b/src/lib/source/system/other/syslog-priv-srv/producer-for
new file mode 100644
index 0000000..8471961
--- /dev/null
+++ b/src/lib/source/system/other/syslog-priv-srv/producer-for
@@ -0,0 +1 @@
+syslog-priv-log
diff --git a/src/lib/source/system/other/syslog-priv-srv/run b/src/lib/source/system/other/syslog-priv-srv/run
new file mode 100644
index 0000000..a2ccd71
--- /dev/null
+++ b/src/lib/source/system/other/syslog-priv-srv/run
@@ -0,0 +1,12 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+# https://skarnet.org/software/s6/s6-socklog.html
+
+fdmove -c 2 1
+
+s6-envuidgid @loguser@
+
+s6-socklog
+ -d3 -U
+ -x /var/run/logpriv
diff --git a/src/lib/source/system/other/syslog-priv-srv/type b/src/lib/source/system/other/syslog-priv-srv/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/src/lib/source/system/other/syslog-priv-srv/type
@@ -0,0 +1 @@
+longrun
diff --git a/src/lib/source/system/other/syslog-srv/dependencies.d/mount b/src/lib/source/system/other/syslog-srv/dependencies.d/mount
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/lib/source/system/other/syslog-srv/dependencies.d/mount
diff --git a/src/lib/source/system/other/syslog-srv/notification-fd b/src/lib/source/system/other/syslog-srv/notification-fd
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/src/lib/source/system/other/syslog-srv/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/src/lib/source/system/other/syslog-srv/producer-for b/src/lib/source/system/other/syslog-srv/producer-for
new file mode 100644
index 0000000..0a564f6
--- /dev/null
+++ b/src/lib/source/system/other/syslog-srv/producer-for
@@ -0,0 +1 @@
+syslog-log
diff --git a/src/lib/source/system/other/syslog-srv/run b/src/lib/source/system/other/syslog-srv/run
new file mode 100644
index 0000000..f5fc7d4
--- /dev/null
+++ b/src/lib/source/system/other/syslog-srv/run
@@ -0,0 +1,12 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+# https://skarnet.org/software/s6/s6-socklog.html
+
+fdmove -c 2 1
+
+s6-envuidgid @loguser@
+
+s6-socklog
+ -d3 -U
+ -x /var/run/log
diff --git a/src/lib/source/system/other/syslog-srv/type b/src/lib/source/system/other/syslog-srv/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/src/lib/source/system/other/syslog-srv/type
@@ -0,0 +1 @@
+longrun
diff --git a/src/lib/source/system/udev/devd-log/consumer-for b/src/lib/source/system/udev/devd-log/consumer-for
new file mode 100644
index 0000000..168535f
--- /dev/null
+++ b/src/lib/source/system/udev/devd-log/consumer-for
@@ -0,0 +1 @@
+devd-srv
diff --git a/src/lib/source/system/udev/devd-log/no-ml b/src/lib/source/system/udev/devd-log/no-ml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/lib/source/system/udev/devd-log/no-ml
diff --git a/src/lib/source/system/udev/devd-log/notification-fd b/src/lib/source/system/udev/devd-log/notification-fd
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/src/lib/source/system/udev/devd-log/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/src/lib/source/system/udev/devd-log/pipeline-name b/src/lib/source/system/udev/devd-log/pipeline-name
new file mode 100644
index 0000000..0b3e805
--- /dev/null
+++ b/src/lib/source/system/udev/devd-log/pipeline-name
@@ -0,0 +1 @@
+devd
diff --git a/src/lib/source/system/udev/devd-log/run b/src/lib/source/system/udev/devd-log/run
new file mode 100644
index 0000000..8ac325e
--- /dev/null
+++ b/src/lib/source/system/udev/devd-log/run
@@ -0,0 +1,11 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+fdmove -c 1 2
+
+if { mkdir -p -m750 -- @tmpfsdir@/@sysrundir@/log/devd }
+if { chown -R @loguser@:@loguser@ @tmpfsdir@/@sysrundir@/log/devd }
+
+s6-setuidgid @loguser@
+s6-log -bd3 n3 T @tmpfsdir@/@sysrundir@/log/devd
diff --git a/src/lib/source/system/udev/devd-log/type b/src/lib/source/system/udev/devd-log/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/src/lib/source/system/udev/devd-log/type
@@ -0,0 +1 @@
+longrun
diff --git a/src/lib/source/system/udev/devd-srv/dependencies.d/mount-dev b/src/lib/source/system/udev/devd-srv/dependencies.d/mount-dev
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/lib/source/system/udev/devd-srv/dependencies.d/mount-dev
diff --git a/src/lib/source/system/udev/devd-srv/no-ml b/src/lib/source/system/udev/devd-srv/no-ml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/lib/source/system/udev/devd-srv/no-ml
diff --git a/src/lib/source/system/udev/devd-srv/producer-for b/src/lib/source/system/udev/devd-srv/producer-for
new file mode 100644
index 0000000..09c60aa
--- /dev/null
+++ b/src/lib/source/system/udev/devd-srv/producer-for
@@ -0,0 +1 @@
+devd-log
diff --git a/src/lib/source/system/udev/devd-srv/run b/src/lib/source/system/udev/devd-srv/run
new file mode 100644
index 0000000..13e7a64
--- /dev/null
+++ b/src/lib/source/system/udev/devd-srv/run
@@ -0,0 +1,7 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+fdmove -c 2 1
+
+devd -d
diff --git a/src/lib/source/system/udev/devd-srv/type b/src/lib/source/system/udev/devd-srv/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/src/lib/source/system/udev/devd-srv/type
@@ -0,0 +1 @@
+longrun
diff --git a/src/lib/source/system/vfs/mount-dev/down b/src/lib/source/system/vfs/mount-dev/down
new file mode 100644
index 0000000..9952c93
--- /dev/null
+++ b/src/lib/source/system/vfs/mount-dev/down
@@ -0,0 +1,9 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+#fdmove -c 2 1
+
+# Not umounting since it is used until shutdown anyway
+
+#umount /dev
diff --git a/src/lib/source/system/vfs/mount-dev/type b/src/lib/source/system/vfs/mount-dev/type
new file mode 100644
index 0000000..bdd22a1
--- /dev/null
+++ b/src/lib/source/system/vfs/mount-dev/type
@@ -0,0 +1 @@
+oneshot
diff --git a/src/lib/source/system/vfs/mount-dev/up b/src/lib/source/system/vfs/mount-dev/up
new file mode 100644
index 0000000..b349c6e
--- /dev/null
+++ b/src/lib/source/system/vfs/mount-dev/up
@@ -0,0 +1,7 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+fdmove -c 2 1
+
+mount -t devfs dev /dev
diff --git a/src/lib/source/system/vfs/mount-run/down b/src/lib/source/system/vfs/mount-run/down
new file mode 100644
index 0000000..d564e3d
--- /dev/null
+++ b/src/lib/source/system/vfs/mount-run/down
@@ -0,0 +1,9 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+#fdmove -c 2 1
+
+# Not umounting since it is used until shutdown anyway
+
+#umount /run
diff --git a/src/lib/source/system/vfs/mount-run/type b/src/lib/source/system/vfs/mount-run/type
new file mode 100644
index 0000000..bdd22a1
--- /dev/null
+++ b/src/lib/source/system/vfs/mount-run/type
@@ -0,0 +1 @@
+oneshot
diff --git a/src/lib/source/system/vfs/mount-run/up b/src/lib/source/system/vfs/mount-run/up
new file mode 100644
index 0000000..a508833
--- /dev/null
+++ b/src/lib/source/system/vfs/mount-run/up
@@ -0,0 +1,13 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+
+fdmove -c 2 1
+
+# if tmpfsdir is = /run, /run it is already mounted.
+# the value before "=" is replaced during build time,
+# making this check look silly.
+
+if -x0 { eltest @tmpfsdir@ != /run }
+ mount -t tmpfs tmpfs /run
+
diff --git a/tools/gen-deps.sh b/tools/gen-deps.sh
new file mode 100755
index 0000000..fafb347
--- /dev/null
+++ b/tools/gen-deps.sh
@@ -0,0 +1,35 @@
+#!/bin/sh -e
+
+. package/info
+
+echo '#'
+echo '# This file has been generated by tools/gen-deps.sh'
+echo '#'
+echo
+
+if test -d src/bin
+then
+ cd src/bin
+ for FILE in $(find * -type f 2> /dev/null); do
+ echo "${FILE}: src/bin/${FILE}"
+ echo "\$(DESTDIR)\$(bindir)/${FILE}: ${FILE}"
+ done
+ cd ../..
+fi
+
+if test -d src/lib
+then
+ cd src/lib
+ for FILE in $(find * -type f 2> /dev/null); do
+ echo "${FILE}: src/lib/${FILE}"
+ echo "\$(DESTDIR)\$(libdir)/${FILE}: ${FILE}"
+ done
+ cd ../..
+fi
+
+if test -f package/extras
+then
+ for EXTRA in $(cat package/extras); do
+ echo "\$(DESTDIR)\$(libdir)/${EXTRA}: ${EXTRA}"
+ done
+fi
diff --git a/tools/gen-targets.sh b/tools/gen-targets.sh
new file mode 100755
index 0000000..3280748
--- /dev/null
+++ b/tools/gen-targets.sh
@@ -0,0 +1,56 @@
+#!/bin/sh -e
+
+. package/info
+
+echo '#'
+echo '# This file has been generated by tools/gen-targets.sh'
+echo '#'
+echo
+
+if test -d src/bin
+then
+ cd src/bin
+
+ echo "ALL_BINS ::= \\"
+
+ for FILE in $(find * -type f 2> /dev/null) ; do
+ echo "\t${FILE} \\"
+ done
+
+ echo
+ echo "INSTALL_BINS ::= \\"
+
+ for FILE in $(find * -type f 2> /dev/null) ; do
+ echo "\t\$(DESTDIR)\$(bindir)/${FILE} \\"
+ done
+
+ echo
+ echo "SLASHCOMMAND_BINS ::= \\"
+
+ for FILE in $(find * -type f 2> /dev/null) ; do
+ echo "\t\$(DESTDIR)\$(sproot)/command/${FILE} \\"
+ done
+
+ cd ../..
+ echo
+fi
+
+if test -d src/lib
+then
+ cd src/lib
+
+ echo "ALL_LIBS ::= \\"
+ for FILE in $(find * -type f 2> /dev/null) ; do
+ echo "\t${FILE} \\"
+ done
+
+ echo
+
+ echo "INSTALL_LIBS ::= \\"
+ for FILE in $(find * -type f 2> /dev/null) ; do
+ echo "\t\$(DESTDIR)\$(libdir)/${FILE} \\"
+ done
+
+ cd ../..
+ echo
+fi
diff --git a/tools/install.sh b/tools/install.sh
new file mode 100755
index 0000000..e96dd7b
--- /dev/null
+++ b/tools/install.sh
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+usage() {
+ echo "usage: $0 [ -D ] [ -l ] [ -m mode ] [ -O owner:group ] src dst" 1>&2
+ exit 1
+}
+
+mkdirp=false
+symlink=false
+mode=0755
+og=
+
+while getopts Dlm:O: name ; do
+ case "$name" in
+ D) mkdirp=true ;;
+ l) symlink=true ;;
+ m) mode=$OPTARG ;;
+ O) og=$OPTARG ;;
+ ?) usage ;;
+ esac
+done
+shift $(($OPTIND - 1))
+
+test "$#" -eq 2 || usage
+src=$1
+dst=$2
+tmp="$dst.tmp.$$"
+
+case "$dst" in
+ */) echo "$0: $dst ends in /" 1>&2 ; exit 1 ;;
+esac
+
+set -C
+set -e
+
+if $mkdirp ; then
+ umask 022
+ case "$2" in
+ */*) mkdir -p "${dst%/*}" ;;
+ esac
+fi
+
+trap 'rm -f "$tmp"' EXIT INT QUIT TERM HUP
+
+umask 077
+
+if $symlink ; then
+ ln -s "$src" "$tmp"
+else
+ cat < "$1" > "$tmp"
+ if test -n "$og" ; then
+ chown -- "$og" "$tmp"
+ fi
+ chmod -- "$mode" "$tmp"
+fi
+
+mv -f "$tmp" "$dst"
+if test -d "$dst" ; then
+ rm -f "$dst/$(basename $tmp)"
+ if $symlink ; then
+ mkdir "$tmp"
+ ln -s "$src" "$tmp/$(basename $dst)"
+ mv -f "$tmp/$(basename $dst)" "${dst%/*}"
+ rmdir "$tmp"
+ else
+ echo "$0: $dst is a directory" 1>&2
+ exit 1
+ fi
+fi