diff --git a/CREDITS b/CREDITS index 4df6c40..cde2d98 100644 --- a/CREDITS +++ b/CREDITS @@ -14,11 +14,11 @@ Jimmy Olsen - memory plugin in Munin - processes plugin in Munin - interupts plugin in Munin - + Mike Fedyk - memory plugin in Munin - context switch graphing in interupts plugin in Munin - + Nicolas Salles - uptime plugin in Munin @@ -32,8 +32,8 @@ Kai Ove Gran - Help regarding available features in busybox in floppyfw - Build script (muninlite.mk) for floppyfw devkit (http://pong.no/floppyfw/muninlite/) - - post ini script (post-muninlite.ini) for floppyfw + - post ini script (post-muninlite.ini) for floppyfw (http://pong.no/floppyfw/muninlite/) Jozsef Marton - - Patch to enable plugin directory \ No newline at end of file + - Patch to enable plugin directory diff --git a/README.md b/README.md index 2d15b38..43169e7 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ MuninLite is a single Bourne Shell script that implements the Munin protocoll as well as some Linux specific plugins. The motivation for developing MuninLite was to provide a simple Munin Node, using inetd on systems without a full featured Perl and/or bash or a busybox -system. +system. MuninLite is Copyright (C) 2007 Rune Nordbøe Skillingstad and released under GPLv2 (see LICENSE file) @@ -106,7 +106,7 @@ echo "munin 4949/tcp lrrd # Munin" >>/etc/services ``` Configure inetd or xinetd to fork this script for request on the -munin port (4949). +munin port (4949). Sample configuration for xinetd is located in `examples/xinetd.d/munin`: ```shell @@ -168,7 +168,7 @@ Plugin configuration To configure which plugins should be enabled, locate the `PLUGINS` variable in munin-node and remove unwanted plugins. -There is no specific configuration for plugins. +There is no specific configuration for plugins. Munin configuration ------------------- diff --git a/doc/Working-distributions.txt b/doc/Working-distributions.txt index e09ace9..901bae5 100644 --- a/doc/Working-distributions.txt +++ b/doc/Working-distributions.txt @@ -3,15 +3,14 @@ These distributions are known to be working with muninlite: * Floppyfw 3.0 - Needs a busybox with inetd - See http://pong.no/floppyfw/muninlite/ - + * Endian Firewall Community 2.1 - Needs some kind of inetd (xinetd RPM from Centos might work) - # rpm -ivh --nodeps ftp://mirror.ii.uib.no/sites/msync.centos.org/centos/2.1/final/i386/CentOS/RPMS/xinetd-2.3.11-2.AS2.1.i386.rpm - Remove '[ "${NETWORKING}" = "yes" ] || exit 0' from /etc/inet.d/xinetd - Add /etc/xinetd.d/munin (see examples dir for config) - - Add munin (port 4949) to /etc/services + - Add munin (port 4949) to /etc/services - Add "munin-node : " to /etc/hosts.allow - -* OpenSuSE 10.2 - - Just works +* OpenSuSE 10.2 + - Just works diff --git a/doc/floppyfw.txt b/doc/floppyfw.txt index 618998b..0d0c1f9 100644 --- a/doc/floppyfw.txt +++ b/doc/floppyfw.txt @@ -8,7 +8,7 @@ Get a copy of the floppyfw devkit: Follow the readme to get a svn check out of the source. For the stable 3.0 series, the command is as follows: -# svn co http://www.zelow.no/svn/floppyfw-3.0 +# svn co http://www.zelow.no/svn/floppyfw-3.0 Edit the BusyBox config with your favourite editor. It's located at /floppyfw-3.0/configs/config-busybox-1.2.2.1 @@ -32,7 +32,7 @@ If you want additional packages, copy the .ffw-files from the directory. Download post-muninlite.ini.txt from http://pong.no/floppyfw/muninlite/ -to the /floppyfw-3.0/floppy/packages directory and rename it to +to the /floppyfw-3.0/floppy/packages directory and rename it to post-muninlite.ini. Make the floppy-image: @@ -51,4 +51,3 @@ If it works, you will see these messages during boot: /mnt/tmp/packages/post-muninlite.ini chmoded Running /etc/post-muninlite.ini Starting inetd. - diff --git a/examples/post-muninlite.ini b/examples/post-muninlite.ini index 7fe90c2..a419a13 100644 --- a/examples/post-muninlite.ini +++ b/examples/post-muninlite.ini @@ -36,6 +36,6 @@ if [ -f /sbin/inetd ]; then echo "Starting inetd." inetd /etc/inetd.conf fi -else +else echo "inetd not found, not installing muninlite" fi diff --git a/munin-node.in b/munin-node.in index 0bf6268..95a7d71 100755 --- a/munin-node.in +++ b/munin-node.in @@ -1,12 +1,12 @@ #!/bin/sh # -# Simple Bourne Shell script that implements Munin protocoll and +# Simple Bourne Shell script that implements Munin protocoll and # some common Linux plugins. # # For latest version, see http://muninlite.sf.net/ # # Copyright (c) 2007-2011 Rune Nordbøe Skillingstad -# +# # Licensed under GPLv2 (see LICENSE file for full License) # # $Id: $ @@ -70,8 +70,8 @@ do_quit() { # ===== Runtime config ===== RES="" for PLUG in $PLUGINS -do - if [ "$PLUG" = "if_" ]; then +do + if [ "$PLUG" = "if_" ]; then for INTER in $(grep -E '^ *(ppp|eth|wlan|ath|ra|ipsec|tap|br-)[^:]{1,}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); do INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/') @@ -106,7 +106,7 @@ do fi done else - RES="$RES $PLUG"; + RES="$RES $PLUG" fi done PLUGINS=$RES @@ -115,15 +115,15 @@ PLUGINS=$RES FUNCTIONS="list nodes config fetch version quit" HOSTNAME=$(hostname -f 2>/dev/null || hostname) echo "# munin node at $HOSTNAME" -while read arg0 arg1 -do +while read arg0 arg1 +do arg0=$(echo "$arg0" | xargs) - arg1=$(echo "$arg1" | xargs) + arg1=$(echo "$arg1" | xargs) if ! echo "$FUNCTIONS" | grep "\b$arg0\b" >/dev/null 2>&1 ; then echo "# Unknown command. Try" $(echo "$FUNCTIONS" | sed -e 's/\( [[:alpha:]]\{1,\}\)/,\1/g' -e 's/,\( [[:alpha:]]\{1,\}\)$/ or\1/') continue fi - - do_$arg0 $arg1 -done + + do_$arg0 $arg1 +done diff --git a/plugins/ntpdate b/plugins/ntpdate index 2b03d26..76d79c2 100644 --- a/plugins/ntpdate +++ b/plugins/ntpdate @@ -11,8 +11,8 @@ fetch_ntpdate() { NTPDATE="/usr/sbin/ntpdate" OFFSET=0 DELAY=0 - if [ "$NTP_PEER" != "" ]; then - if [ -x "$NTPDATE" ]; then + if [ "$NTP_PEER" != "" ]; then + if [ -x "$NTPDATE" ]; then DATA=$($NTPDATE -q $NTP_PEER | awk '/^server.*offset/{gsub(/,/,"");printf "%s %s", ($6*1000), ($8*1000);}') OFFSET=$(echo "$DATA" | cut -d\ -f1) DELAY=$(echo "$DATA" | cut -d\ -f2) @@ -21,4 +21,3 @@ fetch_ntpdate() { echo "offset.value $OFFSET" echo "delay.value $DELAY" } -