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:
parent
46626b9953
commit
199b4517cb
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue