Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 507750 - app-emulation/lxc - add systemd support
Summary: app-emulation/lxc - add systemd support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Diego Elio Pettenò (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: install-systemd-unit
  Show dependency tree
 
Reported: 2014-04-15 18:04 UTC by Joachim Herb
Modified: 2014-04-19 17:14 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joachim Herb 2014-04-15 18:04:25 UTC
The package app-emulation/lxc does not include a systemd start script. Here is a starting point for implementing one (named lxc@.service):
[Unit]
Description=Linux Container %I
After=network.target

[Service]
Type=simple
Restart=always
ExecStart=/usr/sbin/lxc-start -n %i
ExecReload=/usr/sbin/lxc-restart -n %i
ExecStop=/usr/sbin/lxc-stop -n %i

[Install]
WantedBy=multi-user.target

It can be enabled with 
systemctl enable lxc@guestname.service
where guestname is name of the LXC container.

See also: http://wiki.gentoo.org/wiki/LXC#Use_from_gentoo_systemd
 

Reproducible: Always
Comment 1 Pacho Ramos gentoo-dev 2014-04-19 17:14:34 UTC
+*lxc-0.8.0-r2 (19 Apr 2014)
+
+  19 Apr 2014; Pacho Ramos <pacho@gentoo.org> +files/lxc_at.service,
+  +lxc-0.8.0-r2.ebuild:
+  Add unit file (#507750 by Joachim Herb)
+