mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
Plugin lxc: change the plugin from "bash" to "sh"
No more bashisms were left.
This commit is contained in:
parent
6bb4719881
commit
55b881878c
1 changed files with 4 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
# -*- sh -*-
|
# -*- sh -*-
|
||||||
|
|
||||||
: << =cut
|
: << =cut
|
||||||
|
@ -94,7 +94,7 @@ cgrouppath=${cgrouppath:-}
|
||||||
|
|
||||||
# --- FUNCTIONS
|
# --- FUNCTIONS
|
||||||
|
|
||||||
function active_guests {
|
active_guests() {
|
||||||
local excludes="$1"
|
local excludes="$1"
|
||||||
local guest_name
|
local guest_name
|
||||||
for guest_name in $(lxc-ls)
|
for guest_name in $(lxc-ls)
|
||||||
|
@ -109,7 +109,7 @@ function active_guests {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function get_lxc_cgroup_info {
|
get_lxc_cgroup_info() {
|
||||||
local guest_name="$1"
|
local guest_name="$1"
|
||||||
local field="$2"
|
local field="$2"
|
||||||
# lxc3 (lxc < 3: may output some warnings if there is cruft in your config dir)
|
# lxc3 (lxc < 3: may output some warnings if there is cruft in your config dir)
|
||||||
|
@ -117,7 +117,7 @@ function get_lxc_cgroup_info {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function lxc_netdev {
|
lxc_netdev() {
|
||||||
local guest_name="$1"
|
local guest_name="$1"
|
||||||
|
|
||||||
if [ -f "$lxcpath/$guest_name/config" ]; then
|
if [ -f "$lxcpath/$guest_name/config" ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue