aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2016-12-05 15:55:53 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2016-12-05 15:55:53 +0000
commitf76a3e169afcea1fa556686d5c9be7c38ae15a64 (patch)
treed8da5019c05d21ce97f422a7c00df607c421a450
parent2dd76425f7b3b3e821ca2755da3e40952baacb8c (diff)
downloadaports-f76a3e169afcea1fa556686d5c9be7c38ae15a64.tar.bz2
aports-f76a3e169afcea1fa556686d5c9be7c38ae15a64.tar.xz
testing/lxd: ugprade to 2.6.2, updated initd and confd
-rw-r--r--testing/lxd/APKBUILD20
-rw-r--r--testing/lxd/lxd.confd23
-rw-r--r--testing/lxd/lxd.initd31
3 files changed, 45 insertions, 29 deletions
diff --git a/testing/lxd/APKBUILD b/testing/lxd/APKBUILD
index 531368c522..aa369b53e4 100644
--- a/testing/lxd/APKBUILD
+++ b/testing/lxd/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=lxd
-pkgver=2.6
+pkgver=2.6.2
pkgrel=0
pkgdesc="a container hypervisor and a new user experience for LXC"
url="https://linuxcontainers.org/lxd/"
@@ -55,12 +55,12 @@ package() {
"$pkgdir"/etc/conf.d/lxd || return 1
}
-md5sums="1bc362f7fa1a33d7012a606f6b54ec47 lxd-2.6.tar.gz
-370234287e61d9a8fa80e7779629f908 lxd.confd
-b51c126976c5c6fc26e520eb7431315c lxd.initd"
-sha256sums="4d8456c01554676e37dcfb9aa44b0566f26ea91b7518419b388423e44107799c lxd-2.6.tar.gz
-7a8dd2b4bd74463fc912800b4242c1368b479ffde97f58e2ac4f28983fd90c67 lxd.confd
-44fec1554786d833a04295beada70ddd8724146727fb54f580b458d714f43e03 lxd.initd"
-sha512sums="7b6c68cb2eafe5295922fb2179b77aebb3971f3930312464ee978d8a465f6d82edfc9a75127b46334ee03dbbd5d410daa86016d7a5884a7e59bc3827bb0b7fa4 lxd-2.6.tar.gz
-683669afe46c5cf72ef11b86f420ca22b09f61e8299ec0c59be515917a912da30e46be82327f6cd76096ac2bfba02ca259771cddd3de5b2068e5ce06533b26f3 lxd.confd
-9e12a7399b009d0d42c20263f8abd51b164dd76f42c1074c721559edc17df0b31432389c429e3d3680a5bea366f6c7c52ed546bb6d8a4171671045998a2e2c00 lxd.initd"
+md5sums="59a4f949c7cc6bb3846998e9d4e9adaa lxd-2.6.2.tar.gz
+b8649b4f5682d8392b3e60def716c2e8 lxd.confd
+6e48df5cdd6fb7f474fe4dccbc93d627 lxd.initd"
+sha256sums="a7c5e584a6fcb867a3e57818dbbbcd11b13195111fb883e16104d3c72603cd58 lxd-2.6.2.tar.gz
+058885f87bfa5c831f4432f0e111a522a4885c3a30fd48126f8c9e1e0ab944f4 lxd.confd
+0d11e2473b1c6bbbeaad1fc0dde8aeb37eb09b7a5152db13e0bc60935e597442 lxd.initd"
+sha512sums="160c338a7b99a281ac51357e09ebb3090bb7efd785699e9daeccf8dea8d8bd78f3274d7885a9b9cc0322ab9909f958dc35a64a0017597efd856fc3b0af533358 lxd-2.6.2.tar.gz
+14892b2efa96f4938497a7ea0b7b2b7ab630b287c8444b666d24b4aa4fd7af265d2dcb91b4defdfa0b33da610cdc04dc3c8751f00df9209a7933bf30ea9f0790 lxd.confd
+b9d0d4b47832ccfe5545112be9b4dda95de2c368bb617295d83d294153db8605581e243464369cfbe660afc2cb67b8f38d99695fd8d77c6710dbab4462a5b0cc lxd.initd"
diff --git a/testing/lxd/lxd.confd b/testing/lxd/lxd.confd
index 086198a55c..3d553276a5 100644
--- a/testing/lxd/lxd.confd
+++ b/testing/lxd/lxd.confd
@@ -1,26 +1,27 @@
-LXD_OPTIONS=""
-
# Group which owns the shared socket
-LXD_OPTIONS="${LXD_OPTIONS} --group lxd"
-
-# TCP address <addr:port> to listen on in addition to the unix socket (e.g., 127.0.0.1:8443)
-#LXD_OPTIONS="${LXD_OPTIONS} --tcp 127.0.0.1:8443"
+LXD_OPTIONS+=" --group lxd"
# Enable cpu profiling into the specified file
-#LXD_OPTIONS="${LXD_OPTIONS} --cpuprofile ''"
+#LXD_OPTIONS+=" --cpuprofile /tmp/lxc_cpu_profile"
# Enable memory profiling into the specified file
-#LXD_OPTIONS="${LXD_OPTIONS} --memprofile ''"
+#LXD_OPTIONS+=" --memprofile /tmp/lxc_mem_profile"
# Enables debug mode
-#LXD_OPTIONS="${LXD_OPTIONS} --debug"
+#LXD_OPTIONS+=" --debug"
# For debugging, print a complete stack trace every n seconds
-#LXD_OPTIONS="${LXD_OPTIONS} --print-goroutines-every 5"
+#LXD_OPTIONS+=" --print-goroutines-every 5"
# Enables verbose mode
-#LXD_OPTIONS="${LXD_OPTIONS} -v"
+#LXD_OPTIONS+=" -v"
+
+# Logfile to log to
+#LXD_OPTIONS+=" --logfile /var/log/lxd/lxd.log"
+
+# Enables syslog logging
+#LXD_OPTIONS+=" --syslog"
diff --git a/testing/lxd/lxd.initd b/testing/lxd/lxd.initd
index 6f5576cdc1..c1aef377ab 100644
--- a/testing/lxd/lxd.initd
+++ b/testing/lxd/lxd.initd
@@ -1,17 +1,19 @@
#!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxd/files/lxd.initd,v 1.1 2015/07/19 20:36:34 alunduil Exp $
+# $Id$
DAEMON=/usr/sbin/lxd
PIDFILE=/run/lxd.pid
+extra_commands="stopall"
+
depend() {
- need cgmanager
+ need net
+ use lxcfs
- if echo "${LXD_OPTIONS}" | grep -e "--tcp" >/dev/null; then
- need net
- fi
+ # remove with 2.0 release
+ need cgmanager
}
start() {
@@ -29,7 +31,20 @@ start() {
}
stop() {
- ebegin "Stopping lxd server"
- start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE}
+ if [[ $RC_GOINGDOWN = YES ]] || [[ $RC_REBOOT = YES ]]; then
+ stopall
+ else
+ ebegin "Stopping lxd service (but not containers)"
+ start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE}
+ eend $?
+ fi
+}
+
+stopall() {
+ ebegin "Stopping lxd service and containers"
+ if "${DAEMON}" shutdown; then
+ /etc/init.d/lxd zap
+ rm -f ${PIDFILE}
+ fi
eend $?
}