File: foolsm_

package info (click to toggle)
lsm 1.0.21-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 448 kB
  • sloc: ansic: 3,883; sh: 318; makefile: 62
file content (37 lines) | stat: -rwxr-xr-x 598 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
#
# Wildcard-script to monitor foolsm.
#
# Parameters:
#
# 	config
# 	autoconf
# 	suggest
#
#%# family=auto
#%# capabilities=autoconf suggest

if [ "$1" = "autoconf" ]; then
    if [ ! -d /var/lib/foolsm ] ; then
	echo "no (foolsm not found)"
	exit 0
    fi
    echo "yes"
    exit 0
fi

if [ "$1" = "suggest" ]; then
    for file in /var/lib/foolsm/config.*; do
	echo ${file#/var/lib/foolsm/config.}
    done
    exit 0
fi

GRAPH=$(basename $0 | sed 's/^foolsm_//')

if [ "$1" = "config" ]; then
    cat /var/lib/foolsm/config.${GRAPH}
    exit 0
fi

cat /var/lib/foolsm/status.${GRAPH}