diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-12-24 15:38:36 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-12-24 15:38:36 +0000 |
commit | 525c419c22406cb4c50112d1cfe4a614a12ff14e (patch) | |
tree | e1da05a45db4ae14e8d2dbf5ac611cfde8ded2d9 /main/lxc | |
parent | 1a074b8b10b86c4b31ecf83bd146808823ad7f96 (diff) | |
download | aports-525c419c22406cb4c50112d1cfe4a614a12ff14e.tar.bz2 aports-525c419c22406cb4c50112d1cfe4a614a12ff14e.tar.xz |
main/lxc: look for containers in /var/lib/lxc
Diffstat (limited to 'main/lxc')
-rw-r--r-- | main/lxc/APKBUILD | 4 | ||||
-rw-r--r-- | main/lxc/lxc.initd | 23 |
2 files changed, 15 insertions, 12 deletions
diff --git a/main/lxc/APKBUILD b/main/lxc/APKBUILD index 1e72645134..a0b8e36c14 100644 --- a/main/lxc/APKBUILD +++ b/main/lxc/APKBUILD @@ -3,7 +3,7 @@ pkgname=lxc pkgver=0.8.0 _mypkgver=${pkgver/_rc/-rc} -pkgrel=0 +pkgrel=1 pkgdesc="linux containers - tools" url="http://lxc.sourceforge.net/" arch="all" @@ -53,6 +53,6 @@ package() { md5sums="7304fa57146ce687f749b5df876bb20d lxc-0.8.0.tar.gz f0f675456a1751aded10aa428bda9e16 bb-rm.patch 1bf081cd9d66c65f3611ed4af58ef48f 0001-lxc-start-add-option-p-pidfile-FILE-for-use-with-dae.patch -3c80cb6623a93e942773d5f10cc983d3 lxc.initd +07c0a29753770f6b028891f6549aab71 lxc.initd 45d0f604310e58a1359f1745a4739843 setup-lxc-template c3f7fd7e85d40c4a4b1b427048ff9652 setup-lxc-guest" diff --git a/main/lxc/lxc.initd b/main/lxc/lxc.initd index a77ba0e86e..cfa90c8690 100644 --- a/main/lxc/lxc.initd +++ b/main/lxc/lxc.initd @@ -13,16 +13,19 @@ depend() { } lxc_get_configfile() { - if [ -f "/etc/lxc/${CONTAINER}.conf" ]; then - echo "/etc/lxc/${CONTAINER}.conf" - elif [ -f "/etc/lxc/${CONTAINER}/config" ]; then - echo "/etc/lxc/${CONTAINER}/config" - else - eerror "Unable to find a suitable configuration file." - eerror "If you set up the container in a non-standard" - eerror "location, please set the CONFIGFILE variable." - return 1 - fi + local i + for i in /var/lib/lxc/${CONTAINER}/config \ + /etc/lxc/${CONTAINER}.conf \ + /etc/lxc/${CONTAINER}/config; do + if [ -f "$i" ]; then + echo "$i" + return 0 + fi + done + eerror "Unable to find a suitable configuration file." + eerror "If you set up the container in a non-standard" + eerror "location, please set the CONFIGFILE variable." + return 1 } lxc_get_var() { |