From 6e8752e628915c2ecdef3465df80cf7e0abda39c Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Tue, 16 Oct 2012 11:41:11 -0400 Subject: doc: fixed awful cat | grep | wc abomination in probes example [ci skip] --- doc/server/plugins/probes/index.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/server/plugins/probes/index.txt b/doc/server/plugins/probes/index.txt index cb7b30ad0..472c2e754 100644 --- a/doc/server/plugins/probes/index.txt +++ b/doc/server/plugins/probes/index.txt @@ -60,18 +60,22 @@ we want to get rid of that last line:: So, from the Probes standpoint we want to create a script that counts the number of SCSI disks in a client machine. To do this, we create a -very simple ``Probes/scratchlocal`` script:: +very simple ``Probes/scratchlocal`` script: - cat /proc/scsi/scsi | grep Vendor | wc -l +.. code-block:: bash + + grep -c /proc/scsi/scsi Running this on a node with *n* disks will return the number *n+1*, as it also counts the controller as a device. To differentiate between the two classes of machines we care about, we just need to check the output of this script for numbers greater than 2. We do this in the template. -This example uses :ref:`server-plugins-generators-cfg-cheetah`, but -Cheetah templates are **not** required in order for Probes to operate -properly. +.. note:: + + This example uses :ref:`server-plugins-generators-cfg-cheetah`, + but Cheetah templates are **not** required in order for Probes to + operate properly. For the template we will want to create a ``Cfg/etc/auto.master`` directory to hold the template of the file in question. Inside of this -- cgit v1.2.3-1-g7c22