blob: 8f0a12ed99e9492509c7b7a860f47b8cfce4f8e7 (
plain)
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
38
39
40
41
42
43
44
45
46
47
48
49
|
.. -*- mode: rst -*-
.. _server-plugins-probes-manufacturer:
manufacturer
============
Probe to output some standardized group names based on the manufacturer
information.
.. code-block:: sh
#!/bin/sh
#
PATH=/bin:/usr/bin:/sbin:/usr/sbin; export PATH
manufacturer=manuf-no-demidecode
os=`uname -s`
if [ $os = "Linux" ] ; then
manufacturer=`dmidecode -s system-manufacturer 2>&1| sed -e 's/[ ]\+$//g'`
case $manufacturer in
"Dell Inc.")
manufacturer="manuf-dell"
;;
"Sun Microsystems")
manufacturer="manuf-sun"
;;
"VMware, Inc.")
manufacturer="manuf-vmware"
;;
*)
manufacturer="manuf-unknown"
;;
esac
fi
if [ $os = "SunOS" ]; then
case `uname -i` in
SUNW,*)
manufacturer="manuf-sun"
;;
*)
manufacturer="manuf-unknown"
;;
esac
fi
echo group:$manufacturer
|