Add support for systemd-nspawn containers

This adds support for running OpenRC in a container created by
the systemd-nspawn utility.

This fixes #52.

X-Gentoo-Bug: 548058
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=548058
This commit is contained in:
William Hubbs
2015-04-28 15:07:21 -05:00
parent a27d577da8
commit c709e6077c
4 changed files with 16 additions and 9 deletions

View File

@@ -34,7 +34,10 @@ sourcex()
sourcex "@LIBEXECDIR@/sh/functions.sh"
sourcex "@LIBEXECDIR@/sh/rc-functions.sh"
[ "$RC_SYS" != "PREFIX" ] && sourcex -e "@LIBEXECDIR@/sh/rc-cgroup.sh"
case $RC_SYS in
PREFIX|SYSTEMD-NSPAWN) ;;
*) sourcex -e "@LIBEXECDIR@/sh/rc-cgroup.sh";;
esac
# Support LiveCD foo
if sourcex -e "/sbin/livecd-functions.sh"; then