diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-10-16 11:41:11 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-10-16 11:41:39 -0400 |
commit | 6e8752e628915c2ecdef3465df80cf7e0abda39c (patch) | |
tree | 04f72db4cce3d28a1cc81553032e4644e8202325 | |
parent | 29003421ac5d929f456a3ad78e29b277cfff6c8f (diff) | |
download | bcfg2-6e8752e628915c2ecdef3465df80cf7e0abda39c.tar.gz bcfg2-6e8752e628915c2ecdef3465df80cf7e0abda39c.tar.bz2 bcfg2-6e8752e628915c2ecdef3465df80cf7e0abda39c.zip |
doc: fixed awful cat | grep | wc abomination in probes example
[ci skip]
-rw-r--r-- | doc/server/plugins/probes/index.txt | 14 |
1 files changed, 9 insertions, 5 deletions
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 |