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

Plugin lxc: use "grep -E" instead of "egrep"

This commit is contained in:
Lars Kruse 2019-08-12 01:11:31 +02:00
parent 46626b9953
commit 199b4517cb

View file

@ -120,8 +120,8 @@ function lxc_netdev {
if [ -f "$lxcpath/$guest_name/config" ]; then
# lxc 3 vs < 3
(egrep '^lxc.net.0.veth.pair' "$lxcpath/$guest_name/config" 2>/dev/null \
|| egrep '^lxc.network.veth.pair' "$lxcpath/$guest_name/config"
(grep -EF '^lxc.net.0.veth.pair' "$lxcpath/$guest_name/config" 2>/dev/null \
|| grep -EF '^lxc.network.veth.pair' "$lxcpath/$guest_name/config"
) | awk '{print $NF;}'
fi
}
@ -361,8 +361,8 @@ do
value_up="U"
value_down="U"
else
value_up=$(egrep "^ *${device}:" /proc/net/dev | awk '{print $10;}')
value_down=$(egrep "^ *${device}:" /proc/net/dev | awk '{print $2;}')
value_up=$(grep -E "^ *${device}:" /proc/net/dev | awk '{print $10;}')
value_down=$(grep -E "^ *${device}:" /proc/net/dev | awk '{print $2;}')
fi
cat <<EOF