projects
/
sysadmin-cookbook
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
277246b
)
lxc-ls displays random files in /var/lib/lxc/ and duplicates so don't use it
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 24 Mar 2010 19:03:16 +0000
(19:03 +0000)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 24 Mar 2010 19:03:16 +0000
(19:03 +0000)
git-svn-id: svn://svn.rot13.org/sysadmin-cookbook@195
191e9f34
-6774-4a6d-acfc-
7664dacd4a2a
recepies/lxc/lxc-watchdog.sh
patch
|
blob
|
history
diff --git
a/recepies/lxc/lxc-watchdog.sh
b/recepies/lxc/lxc-watchdog.sh
index
077b4aa
..
33f9e9c
100755
(executable)
--- a/
recepies/lxc/lxc-watchdog.sh
+++ b/
recepies/lxc/lxc-watchdog.sh
@@
-42,7
+42,7
@@
lxc_rootfs() {
lxc_status() {
-
lxc-ls -1
| sort -u | xargs -i lxc-info -n {} | sed "s/'//g" | while read name is status ; do
+
find /var/lib/lxc/ -name "config" | cut -d/ -f5
| sort -u | xargs -i lxc-info -n {} | sed "s/'//g" | while read name is status ; do
boot=" "
test -s /var/lib/lxc/$name/on_boot && boot="boot"
echo "$name $status $boot $(lxc_rootfs $name)"