Projet

Général

Profil

Révision 17f78427

ID17f784270ae966ee9a13e9f5104a5b8f925b639e
Parent ef851f0c
Enfant d4320aea, 5b2396a9

Ajouté par Lars Kruse il y a plus de 7 ans

Whitespace cleanup

  • remove trailing whitespace
  • remove empty lines at the end of files

Voir les différences:

plugins/disk/file_age
8 8
	COUNTER=1
9 9
	while [ $COUNTER -gt 0 ]; do
10 10
	    FILE_PATH="file${COUNTER}_path"
11
	    
11

  
12 12
	    # Is the path for this file specified?
13 13
	    eval FILE=\$$FILE_PATH
14 14
	    if [ "$FILE" == "" ]; then
15 15
		break;
16 16
	    fi
17
	    
17

  
18 18
	    # It is! Add it to the graphs.
19 19
	    GRAPH_ORDER="$GRAPH_ORDER file_$COUNTER"
20
	    
20

  
21 21
	    # Does this file have a specified label?
22 22
	    LABEL_COUNTER="file${COUNTER}_label"
23 23
	    eval LABEL=\$$LABEL_COUNTER
24 24
	    if [ "$LABEL" == "" ]; then
25 25
		LABEL=`basename $FILE`
26 26
	    fi
27
	    
27

  
28 28
	    # Associated warning level?
29 29
	    WARNING="file${COUNTER}_warning"
30 30
	    eval WARNING=\$$WARNING
......
44 44
	    echo "file_$COUNTER.min 0"
45 45
	    let COUNTER=COUNTER+1
46 46
	done;
47
	
47

  
48 48
	echo "graph_order $GRAPH_ORDER"
49 49
	echo "graph_title File age"
50 50
	echo 'graph_args --base 1000 -l 0'
......
63 63
    if [ "$FILE" == "" ]; then
64 64
	break;
65 65
    fi
66
    
67
    # If the file isn't readable, say it's zero.    
66

  
67
    # If the file isn't readable, say it's zero.
68 68
    if [ ! -r "$FILE" ]; then
69 69
	VALUE=0
70 70
    else
71 71
        VALUE=$(($(date +%s) - $(stat -c '%Y' "$FILE")))
72 72
    fi
73
    
73

  
74 74
    echo "file_$COUNTER.value $VALUE"
75 75
    let COUNTER=COUNTER+1
76 76
done;

Formats disponibles : Unified diff