summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-containers/lxc/files')
-rw-r--r--app-containers/lxc/files/lxc-2.0.5-omit-sysconfig.patch5
-rw-r--r--app-containers/lxc/files/lxc-monitord.service.5.0.011
-rw-r--r--app-containers/lxc/files/lxc-net.service.5.0.015
-rw-r--r--app-containers/lxc/files/lxc.initd.9 (renamed from app-containers/lxc/files/lxc.initd.8)5
-rw-r--r--app-containers/lxc/files/lxc.service-5.0.019
-rw-r--r--app-containers/lxc/files/lxc_at.service.4.0.015
-rw-r--r--app-containers/lxc/files/lxc_at.service.5.0.019
7 files changed, 67 insertions, 22 deletions
diff --git a/app-containers/lxc/files/lxc-2.0.5-omit-sysconfig.patch b/app-containers/lxc/files/lxc-2.0.5-omit-sysconfig.patch
deleted file mode 100644
index 3ec81356499e..000000000000
--- a/app-containers/lxc/files/lxc-2.0.5-omit-sysconfig.patch
+++ /dev/null
@@ -1,5 +0,0 @@
---- /config/Makefile.am.orig 2016-05-19 02:56:11.891113982 +0000
-+++ /config/Makefile.am 2016-05-19 02:56:32.596115476 +0000
-@@ -1 +1 @@
--SUBDIRS = apparmor bash etc init selinux templates yum sysconfig
-+SUBDIRS = apparmor bash etc init selinux templates yum
diff --git a/app-containers/lxc/files/lxc-monitord.service.5.0.0 b/app-containers/lxc/files/lxc-monitord.service.5.0.0
new file mode 100644
index 000000000000..ff4a201152c0
--- /dev/null
+++ b/app-containers/lxc/files/lxc-monitord.service.5.0.0
@@ -0,0 +1,11 @@
+[Unit]
+Description=LXC Container Monitoring Daemon
+After=syslog.service network.target
+Documentation=man:lxc
+
+[Service]
+Type=simple
+ExecStart=/usr/libexec/lxc/lxc-monitord --daemon
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-containers/lxc/files/lxc-net.service.5.0.0 b/app-containers/lxc/files/lxc-net.service.5.0.0
new file mode 100644
index 000000000000..8a037fcb7614
--- /dev/null
+++ b/app-containers/lxc/files/lxc-net.service.5.0.0
@@ -0,0 +1,15 @@
+[Unit]
+Description=LXC network bridge setup
+After=network-online.target
+Before=lxc.service
+Documentation=man:lxc
+ConditionVirtualization=!lxc
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/libexec/lxc/lxc-net start
+ExecStop=/usr/libexec/lxc/lxc-net stop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-containers/lxc/files/lxc.initd.8 b/app-containers/lxc/files/lxc.initd.9
index 727f6d504fb3..4958fbcbbc7b 100644
--- a/app-containers/lxc/files/lxc.initd.8
+++ b/app-containers/lxc/files/lxc.initd.9
@@ -26,7 +26,8 @@ lxc_get_var() {
}
lxc_get_net_link_type() {
- awk 'BEGIN { FS="[ \t]*=[ \t]*"; _link=""; _type="" }
+ # gentoo bugfix 909640, drop commented lines before awk
+ grep -v '^#' ${CONFIGFILE} | awk 'BEGIN { FS="[ \t]*=[ \t]*"; _link=""; _type="" }
$1 == "lxc.network.type" {_type=$2;}
$1 == "lxc.network.link" {_link=$2;}
match($1, /lxc\.net\.[[:digit:]]+\.type/) {_type=$2;}
@@ -34,7 +35,7 @@ lxc_get_net_link_type() {
{if(_link != "" && _type != ""){
printf("%s:%s\n", _link, _type );
_link=""; _type="";
- }; }' <${CONFIGFILE}
+ }; }'
}
checkconfig() {
diff --git a/app-containers/lxc/files/lxc.service-5.0.0 b/app-containers/lxc/files/lxc.service-5.0.0
new file mode 100644
index 000000000000..35d0dff241d0
--- /dev/null
+++ b/app-containers/lxc/files/lxc.service-5.0.0
@@ -0,0 +1,19 @@
+[Unit]
+Description=LXC Container Initialization and Autoboot Code
+After=network.target lxc-net.service remote-fs.target
+Wants=lxc-net.service
+Documentation=man:lxc-autostart man:lxc
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStartPre=/usr/libexec/lxc/lxc-apparmor-load
+ExecStart=/usr/libexec//lxc/lxc-containers start
+ExecStop=/usr/libexec/lxc/lxc-containers stop
+ExecReload=/usr/libexec/lxc/lxc-apparmor-load
+# Environment=BOOTUP=serial
+# Environment=CONSOLETYPE=serial
+Delegate=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-containers/lxc/files/lxc_at.service.4.0.0 b/app-containers/lxc/files/lxc_at.service.4.0.0
deleted file mode 100644
index b354bc53e080..000000000000
--- a/app-containers/lxc/files/lxc_at.service.4.0.0
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Description=Linux Container %i
-After=network.target
-Wants=lxcfs.service
-
-[Service]
-Type=forking
-ExecStart=/usr/bin/lxc-start -d -n %i -p /run/lxc-%i.pid
-PIDFile=/run/lxc-%i.pid
-ExecStop=/usr/bin/lxc-stop -n %i
-Delegate=true
-TasksMax=32768
-
-[Install]
-WantedBy=multi-user.target
diff --git a/app-containers/lxc/files/lxc_at.service.5.0.0 b/app-containers/lxc/files/lxc_at.service.5.0.0
new file mode 100644
index 000000000000..447b6c87ec5d
--- /dev/null
+++ b/app-containers/lxc/files/lxc_at.service.5.0.0
@@ -0,0 +1,19 @@
+[Unit]
+Description=LXC Container: %i
+# This pulls in apparmor, dev-setup, lxc-net
+After=lxc.service
+Wants=lxc.service
+Documentation=man:lxc-start man:lxc
+
+[Service]
+Type=simple
+KillMode=mixed
+TimeoutStopSec=120s
+ExecStart=/usr/bin/lxc-start -F -n %i
+ExecStop=/usr/bin/lxc-stop -n %i
+# Environment=BOOTUP=serial
+# Environment=CONSOLETYPE=serial
+Delegate=yes
+
+[Install]
+WantedBy=multi-user.target