From 29fbe62eba9a4076071dbb8b6b6dfd93e2be2d0e Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Thu, 18 Oct 2012 01:11:24 +0200
Subject: [PATCH] Convert man page highlighting to standard RST

Instead of using the sphinx-specific highlight extension, which is not
parsed by Pandoc, let's switch to the standard RST directive, which
will be picked up and will result in slightly nicer man pages when
converted to HTML (in man output it remains the same).

Note that I've converted only some of the examples (the one that
actually had shell scripts); the ones that show command lines
(e.g. starting with '#') I didn't convert, as they don't look nice
(and Pandoc/Kate highlighting doesn't have the equivalent of our
shell-example lexer we use in sphinx).

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
---
 man/ganeti-listrunner.rst   | 10 +++++++---
 man/ganeti-os-interface.rst | 10 ++++++----
 man/ganeti-watcher.rst      |  4 +++-
 man/gnt-instance.rst        |  4 +++-
 4 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/man/ganeti-listrunner.rst b/man/ganeti-listrunner.rst
index b6e024268..b498fe4c5 100644
--- a/man/ganeti-listrunner.rst
+++ b/man/ganeti-listrunner.rst
@@ -86,11 +86,15 @@ The exist status of the command will be zero, unless it was aborted in some way
 EXAMPLE
 -------
 
-Run a command on a list of hosts::
+Run a command on a list of hosts:
+
+.. code-block:: Bash
 
   listrunner -l logdir -c "uname -a" -h host1,host2,host3
 
-Upload a script, some auxiliary files and run the script::
+Upload a script, some auxiliary files and run the script:
+
+.. code-block:: Bash
 
   listrunner -l logdir -x runme.sh \
     -a seed.dat -a golden.dat \
@@ -100,7 +104,7 @@ Upload a script, some auxiliary files and run the script::
 SEE ALSO
 --------
 
-dsh(1), cssh(1)
+**dsh**(1), **cssh**(1)
 
 .. vim: set textwidth=72 :
 .. Local Variables:
diff --git a/man/ganeti-os-interface.rst b/man/ganeti-os-interface.rst
index 913faac2b..b1f4a1713 100644
--- a/man/ganeti-os-interface.rst
+++ b/man/ganeti-os-interface.rst
@@ -223,10 +223,10 @@ Currently (API version 20), only one parameter is supported:
 environment, and output diagnostic messages in case the validation
 fails.
 
-.. highlight:: sh
-
 For the ``dhcp`` parameter given as example above, a verification
-script could be::
+script could be:
+
+.. code-block:: Bash
 
     #!/bin/sh
 
@@ -340,7 +340,9 @@ Version 4 to 5
 
 The rename script has been added. If you don't want to do any
 changes on the instances after a rename, you can migrate the OS
-definition to version 5 by creating the rename script simply as::
+definition to version 5 by creating the rename script simply as:
+
+.. code-block:: Bash
 
     #!/bin/sh
 
diff --git a/man/ganeti-watcher.rst b/man/ganeti-watcher.rst
index 7c61d3830..9d5db2798 100644
--- a/man/ganeti-watcher.rst
+++ b/man/ganeti-watcher.rst
@@ -79,7 +79,9 @@ re-activated).
 
 In some cases, it's even desirable to reset the watcher state, for
 example after maintenance actions, or when you want to simulate the
-reboot of all nodes, so in this case, you can remove all state files::
+reboot of all nodes, so in this case, you can remove all state files:
+
+.. code-block:: Bash
 
     rm -f @LOCALSTATEDIR@/lib/ganeti/watcher.*.data
     rm -f @LOCALSTATEDIR@/lib/ganeti/watcher.*.instance-status
diff --git a/man/gnt-instance.rst b/man/gnt-instance.rst
index acedb5b26..458aef4fa 100644
--- a/man/gnt-instance.rst
+++ b/man/gnt-instance.rst
@@ -566,7 +566,9 @@ cpu\_mask
     the colon-separated list _must_ equal the number of VCPUs of the
     instance.
 
-    Example::
+    Example:
+
+    .. code-block:: Bash
 
       # Map the entire instance to CPUs 0-2
       gnt-instance modify -H cpu_mask=0-2 my-inst
-- 
GitLab