whitespace cleanup

This commit is contained in:
Lars Kruse 2019-07-23 04:52:37 +02:00
parent 215abe08ae
commit b0e991d4d4
7 changed files with 27 additions and 30 deletions

View file

@ -14,11 +14,11 @@ Jimmy Olsen <jimmyo@linpro.no>
- memory plugin in Munin - memory plugin in Munin
- processes plugin in Munin - processes plugin in Munin
- interupts plugin in Munin - interupts plugin in Munin
Mike Fedyk <mfedyk@mikefedyk.com> Mike Fedyk <mfedyk@mikefedyk.com>
- memory plugin in Munin - memory plugin in Munin
- context switch graphing in interupts plugin in Munin - context switch graphing in interupts plugin in Munin
Nicolas Salles <mosan@users.sourceforge.net> Nicolas Salles <mosan@users.sourceforge.net>
- uptime plugin in Munin - uptime plugin in Munin
@ -32,8 +32,8 @@ Kai Ove Gran <kaiove@humla.no>
- Help regarding available features in busybox in floppyfw - Help regarding available features in busybox in floppyfw
- Build script (muninlite.mk) for floppyfw devkit - Build script (muninlite.mk) for floppyfw devkit
(http://pong.no/floppyfw/muninlite/) (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/) (http://pong.no/floppyfw/muninlite/)
Jozsef Marton Jozsef Marton
- Patch to enable plugin directory - Patch to enable plugin directory

View file

@ -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 protocoll as well as some Linux specific plugins. The motivation for
developing MuninLite was to provide a simple Munin Node, using inetd developing MuninLite was to provide a simple Munin Node, using inetd
on systems without a full featured Perl and/or bash or a busybox on systems without a full featured Perl and/or bash or a busybox
system. system.
MuninLite is Copyright (C) 2007 Rune Nordbøe Skillingstad MuninLite is Copyright (C) 2007 Rune Nordbøe Skillingstad
<rune@skillingstad.no> and released under GPLv2 (see LICENSE file) <rune@skillingstad.no> 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 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`: Sample configuration for xinetd is located in `examples/xinetd.d/munin`:
```shell ```shell
@ -168,7 +168,7 @@ Plugin configuration
To configure which plugins should be enabled, locate the `PLUGINS` To configure which plugins should be enabled, locate the `PLUGINS`
variable in munin-node and remove unwanted 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 Munin configuration
------------------- -------------------

View file

@ -3,15 +3,14 @@ These distributions are known to be working with muninlite:
* Floppyfw 3.0 * Floppyfw 3.0
- Needs a busybox with inetd - Needs a busybox with inetd
- See http://pong.no/floppyfw/muninlite/ - See http://pong.no/floppyfw/muninlite/
* Endian Firewall Community 2.1 * Endian Firewall Community 2.1
- Needs some kind of inetd (xinetd RPM from Centos might work) - 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 - # 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 - Remove '[ "${NETWORKING}" = "yes" ] || exit 0' from /etc/inet.d/xinetd
- Add /etc/xinetd.d/munin (see examples dir for config) - 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 : <ip adress of munin gatherer>" to /etc/hosts.allow - Add "munin-node : <ip adress of munin gatherer>" to /etc/hosts.allow
* OpenSuSE 10.2
- Just works
* OpenSuSE 10.2
- Just works

View file

@ -8,7 +8,7 @@ Get a copy of the floppyfw devkit:
Follow the readme to get a svn check out of the source. Follow the readme to get a svn check out of the source.
For the stable 3.0 series, the command is as follows: 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 Edit the BusyBox config with your favourite editor. It's located at
/floppyfw-3.0/configs/config-busybox-1.2.2.1 /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. directory.
Download post-muninlite.ini.txt from http://pong.no/floppyfw/muninlite/ 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. post-muninlite.ini.
Make the floppy-image: 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 /mnt/tmp/packages/post-muninlite.ini chmoded
Running /etc/post-muninlite.ini Running /etc/post-muninlite.ini
Starting inetd. Starting inetd.

View file

@ -36,6 +36,6 @@ if [ -f /sbin/inetd ]; then
echo "Starting inetd." echo "Starting inetd."
inetd /etc/inetd.conf inetd /etc/inetd.conf
fi fi
else else
echo "inetd not found, not installing muninlite" echo "inetd not found, not installing muninlite"
fi fi

View file

@ -1,12 +1,12 @@
#!/bin/sh #!/bin/sh
# #
# Simple Bourne Shell script that implements Munin protocoll and # Simple Bourne Shell script that implements Munin protocoll and
# some common Linux plugins. # some common Linux plugins.
# #
# For latest version, see http://muninlite.sf.net/ # For latest version, see http://muninlite.sf.net/
# #
# Copyright (c) 2007-2011 Rune Nordbøe Skillingstad <rune@skillingstad.no> # Copyright (c) 2007-2011 Rune Nordbøe Skillingstad <rune@skillingstad.no>
# #
# Licensed under GPLv2 (see LICENSE file for full License) # Licensed under GPLv2 (see LICENSE file for full License)
# #
# $Id: $ # $Id: $
@ -70,8 +70,8 @@ do_quit() {
# ===== Runtime config ===== # ===== Runtime config =====
RES="" RES=""
for PLUG in $PLUGINS for PLUG in $PLUGINS
do do
if [ "$PLUG" = "if_" ]; then 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'); for INTER in $(grep -E '^ *(ppp|eth|wlan|ath|ra|ipsec|tap|br-)[^:]{1,}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g');
do do
INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/') INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/')
@ -106,7 +106,7 @@ do
fi fi
done done
else else
RES="$RES $PLUG"; RES="$RES $PLUG"
fi fi
done done
PLUGINS=$RES PLUGINS=$RES
@ -115,15 +115,15 @@ PLUGINS=$RES
FUNCTIONS="list nodes config fetch version quit" FUNCTIONS="list nodes config fetch version quit"
HOSTNAME=$(hostname -f 2>/dev/null || hostname) HOSTNAME=$(hostname -f 2>/dev/null || hostname)
echo "# munin node at $HOSTNAME" echo "# munin node at $HOSTNAME"
while read arg0 arg1 while read arg0 arg1
do do
arg0=$(echo "$arg0" | xargs) arg0=$(echo "$arg0" | xargs)
arg1=$(echo "$arg1" | xargs) arg1=$(echo "$arg1" | xargs)
if ! echo "$FUNCTIONS" | grep "\b$arg0\b" >/dev/null 2>&1 ; then 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/') echo "# Unknown command. Try" $(echo "$FUNCTIONS" | sed -e 's/\( [[:alpha:]]\{1,\}\)/,\1/g' -e 's/,\( [[:alpha:]]\{1,\}\)$/ or\1/')
continue continue
fi fi
do_$arg0 $arg1 do_$arg0 $arg1
done done

View file

@ -11,8 +11,8 @@ fetch_ntpdate() {
NTPDATE="/usr/sbin/ntpdate" NTPDATE="/usr/sbin/ntpdate"
OFFSET=0 OFFSET=0
DELAY=0 DELAY=0
if [ "$NTP_PEER" != "" ]; then if [ "$NTP_PEER" != "" ]; then
if [ -x "$NTPDATE" ]; then if [ -x "$NTPDATE" ]; then
DATA=$($NTPDATE -q $NTP_PEER | awk '/^server.*offset/{gsub(/,/,"");printf "%s %s", ($6*1000), ($8*1000);}') DATA=$($NTPDATE -q $NTP_PEER | awk '/^server.*offset/{gsub(/,/,"");printf "%s %s", ($6*1000), ($8*1000);}')
OFFSET=$(echo "$DATA" | cut -d\ -f1) OFFSET=$(echo "$DATA" | cut -d\ -f1)
DELAY=$(echo "$DATA" | cut -d\ -f2) DELAY=$(echo "$DATA" | cut -d\ -f2)
@ -21,4 +21,3 @@ fetch_ntpdate() {
echo "offset.value $OFFSET" echo "offset.value $OFFSET"
echo "delay.value $DELAY" echo "delay.value $DELAY"
} }