1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Fix for lxc < 3

This commit is contained in:
Marc SCHAEFER 2019-08-11 10:11:24 +02:00 committed by Lars Kruse
parent 89e0f1c729
commit 241b0c6067

View file

@ -59,8 +59,9 @@ function lxc_netdev {
if [ -f $lxcpath/$g/config ]; then
# lxc 3 vs < 3
egrep '^lxc.net.0.veth.pair' $lxcpath/$g/config 2>/dev/null | awk '{print $NF;}' \
|| egrep '^lxc.network.veth.pair' $lxcpath/$g/config | awk '{print $NF;}'
(egrep '^lxc.net.0.veth.pair' $lxcpath/$g/config 2>/dev/null \
|| egrep '^lxc.network.veth.pair' $lxcpath/$g/config
) | awk '{print $NF;}'
else
echo unknown
fi