<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Hobgoblin's Master</title><link>http://hobgoblins-master.info/</link><description>Hostile environment Survival Guide! My experience feedback around Linux, free software, system administration and IT in general.</description><atom:link href="http://hobgoblins-master.info/en/rss.xml" type="application/rss+xml" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 25 Aug 2015 11:16:03 GMT</lastBuildDate><generator>http://getnikola.com/</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>APT, Proxy-Auto-Detect et proxy.pac ou wpad.dat</title><link>http://hobgoblins-master.info/en/posts/apt-proxy-auto-detect-et-proxypac-ou-wpaddat.html</link><dc:creator>Landry MINOZA</dc:creator><description>&lt;div&gt;&lt;p&gt;The option &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;Acquire::http::Proxy-Auto-Detect&lt;/span&gt;&lt;/tt&gt; already exists for some time. It was intended to be used with the package &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;squid-deb-proxy-client&lt;/span&gt;&lt;/tt&gt; which is a helper for the APT http method to discover proxies that publish their service as _apt_proxy._tcp. It was justed upgraded (version 1.0.8) and now add the URL as a paramater. It is now possible to discover a common proxy through a proxy.pac script.&lt;/p&gt;
&lt;!-- TEASER_END --&gt;
&lt;p&gt;My proposed solution uses the package &lt;a class="reference external" href="https://code.google.com/p/libproxy/"&gt;libproxy-tools&lt;/a&gt; and is a shell script wrapper.&lt;/p&gt;
&lt;div class="section" id="packages-to-install"&gt;
&lt;h2&gt;Packages to install&lt;/h2&gt;
&lt;p&gt;The following packages are needed:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;libproxy-tools&lt;/span&gt;&lt;/tt&gt; brings the &lt;tt class="docutils literal"&gt;proxy&lt;/tt&gt; command.&lt;/li&gt;
&lt;li&gt;&lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;libproxy1-plugin-mozjs&lt;/span&gt;&lt;/tt&gt; or &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;libproxy1-plugin-webkit&lt;/span&gt;&lt;/tt&gt; to evaluate wpad.dat or proxy.pac files.&lt;/li&gt;
&lt;li&gt;Optionally &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;libproxy1-plugin-networkmanager&lt;/span&gt;&lt;/tt&gt;, &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;libproxy1-plugin-gsettings&lt;/span&gt;&lt;/tt&gt; or &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;libproxy1-plugin-kconfig&lt;/span&gt;&lt;/tt&gt; to read proxy configuration from Network Manager, Gnome or KDE.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="configuring-apt"&gt;
&lt;h2&gt;Configuring APT&lt;/h2&gt;
&lt;p&gt;Create a new file in &lt;tt class="docutils literal"&gt;/etc/apt/apt.conf.d/&lt;/tt&gt; (for example &lt;tt class="docutils literal"&gt;/etc/apt/apt.conf.d/02proxy&lt;/tt&gt;):&lt;/p&gt;
&lt;pre class="code text"&gt;&lt;a name="rest_code_1301b478fe2443459bbe9f0a1b5c334a-1"&gt;&lt;/a&gt;Acquire::http::Proxy-Auto-Detect "/usr/local/bin/apt-autoproxy.sh";
&lt;/pre&gt;&lt;p&gt;It say to &lt;tt class="docutils literal"&gt;APT&lt;/tt&gt; to launch the given script for earch domain during downloads.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="shell-script-wrapper"&gt;
&lt;h2&gt;Shell script wrapper&lt;/h2&gt;
&lt;p&gt;&lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;/usr/local/bin/apt-autoproxy.sh&lt;/span&gt;&lt;/tt&gt;&lt;/p&gt;
&lt;table class="codetable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;&lt;a href="http://hobgoblins-master.info/en/posts/apt-proxy-auto-detect-et-proxypac-ou-wpaddat.html#rest_code_f0e115993aab4bc1bdfba0237f765bbd-1"&gt;1&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/apt-proxy-auto-detect-et-proxypac-ou-wpaddat.html#rest_code_f0e115993aab4bc1bdfba0237f765bbd-2"&gt;2&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/apt-proxy-auto-detect-et-proxypac-ou-wpaddat.html#rest_code_f0e115993aab4bc1bdfba0237f765bbd-3"&gt;3&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/apt-proxy-auto-detect-et-proxypac-ou-wpaddat.html#rest_code_f0e115993aab4bc1bdfba0237f765bbd-4"&gt;4&lt;/a&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre class="code bash"&gt;&lt;a name="rest_code_f0e115993aab4bc1bdfba0237f765bbd-1"&gt;&lt;/a&gt;     &lt;span class="c"&gt;#!/bin/sh&lt;/span&gt;
&lt;a name="rest_code_f0e115993aab4bc1bdfba0237f765bbd-2"&gt;&lt;/a&gt;
&lt;a name="rest_code_f0e115993aab4bc1bdfba0237f765bbd-3"&gt;&lt;/a&gt;     &lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;http_proxy&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;wpad://
&lt;a name="rest_code_f0e115993aab4bc1bdfba0237f765bbd-4"&gt;&lt;/a&gt;     &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$*&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; proxy &lt;span class="p"&gt;|&lt;/span&gt; awk &lt;span class="s1"&gt;'{ print $1 }'&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;ul class="simple"&gt;
&lt;li&gt;Line 2 is optional, it allows to force search of an automatic proxy for the root user when it does not have KDE or Gnome proxy setting (or plugins &lt;tt class="docutils literal"&gt;networkmanager&lt;/tt&gt;, &lt;tt class="docutils literal"&gt;gsettings&lt;/tt&gt; or &lt;tt class="docutils literal"&gt;kconfig&lt;/tt&gt; are not installed).&lt;/li&gt;
&lt;li&gt;Filtering with &lt;tt class="docutils literal"&gt;awk&lt;/tt&gt; allows to provide one proxy to APT (indeed, several proxies may be returned by the &lt;tt class="docutils literal"&gt;proxy&lt;/tt&gt; command (and &lt;tt class="docutils literal"&gt;proxy.pac&lt;/tt&gt; files).&lt;/li&gt;
&lt;li&gt;The wrapper can be tested with the following commands:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="code bash"&gt;&lt;a name="rest_code_88fc746417194198acb2972212c45a66-1"&gt;&lt;/a&gt;/usr/local/bin/apt-autoproxy.sh http://ftp.debian.org
&lt;a name="rest_code_88fc746417194198acb2972212c45a66-2"&gt;&lt;/a&gt;sudo /usr/local/bin/apt-autoproxy.sh http://ftp.debian.org
&lt;/pre&gt;&lt;p&gt;These commands must return a string with no spaces like: &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;http://proxy.example.com:3128&lt;/span&gt;&lt;/tt&gt; in the presence of a proxy or &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;direct://&lt;/span&gt;&lt;/tt&gt; if none is usable for this URL.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</description><category>Debian</category><guid>http://hobgoblins-master.info/en/posts/apt-proxy-auto-detect-et-proxypac-ou-wpaddat.html</guid><pubDate>Thu, 25 Sep 2014 19:31:13 GMT</pubDate></item><item><title>Aptitude cheat sheet</title><link>http://hobgoblins-master.info/en/posts/pense-bete-aptitude.html</link><dc:creator>Landry MINOZA</dc:creator><description>&lt;div&gt;&lt;p&gt;Here are some &lt;tt class="docutils literal"&gt;aptitude&lt;/tt&gt; commands I use regularly but not often enough to remember each time…&lt;/p&gt;
&lt;!-- TEASER_END --&gt;
&lt;p&gt;List of manually installed packages. Usefull to clone an installation:&lt;/p&gt;
&lt;pre class="code bash"&gt;&lt;a name="rest_code_d89598e91d76437480fb1e726608e45d-1"&gt;&lt;/a&gt;aptitude search -F%p ~i&lt;span class="se"&gt;\!&lt;/span&gt;~M
&lt;/pre&gt;&lt;ul class="simple"&gt;
&lt;li&gt;&lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;-F&lt;/span&gt;&lt;/tt&gt; set a format string.&lt;/li&gt;
&lt;li&gt;&lt;tt class="docutils literal"&gt;%p&lt;/tt&gt; is replaced by the package name.&lt;/li&gt;
&lt;li&gt;&lt;tt class="docutils literal"&gt;~i&lt;/tt&gt; select all installed packages.&lt;/li&gt;
&lt;li&gt;&lt;tt class="docutils literal"&gt;!~M&lt;/tt&gt; excludes automaticaly installed packages.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With actually installed versions (usefull if some packages comes from backports or external repositories:&lt;/p&gt;
&lt;pre class="code bash"&gt;&lt;a name="rest_code_6d0e32dfe1694d47ba76fdfd3fbe43dc-1"&gt;&lt;/a&gt;aptitude search --disable-columns -F%p&lt;span class="o"&gt;=&lt;/span&gt;%v ~i&lt;span class="se"&gt;\!&lt;/span&gt;~M
&lt;/pre&gt;&lt;ul class="simple"&gt;
&lt;li&gt;&lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;--disable-columns&lt;/span&gt;&lt;/tt&gt; unset displaying in columns and taking all terminal width.&lt;/li&gt;
&lt;li&gt;&lt;tt class="docutils literal"&gt;%v&lt;/tt&gt; replaced by the version of the package.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example: to clone a host (after copying all &lt;tt class="docutils literal"&gt;sources.list&lt;/tt&gt; files):&lt;/p&gt;
&lt;pre class="code bash"&gt;&lt;a name="rest_code_3c8ba29842314840b3647ca00b4b74d7-1"&gt;&lt;/a&gt;aptitude install &lt;span class="k"&gt;$(&lt;/span&gt;ssh machine_modele aptitude search --disable-columns -F%p&lt;span class="o"&gt;=&lt;/span&gt;%v ~i&lt;span class="se"&gt;\!&lt;/span&gt;~M &lt;span class="p"&gt;|&lt;/span&gt;tr &lt;span class="s1"&gt;'\n'&lt;/span&gt; &lt;span class="s1"&gt;' '&lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;p&gt;Find updates available in backports or experimental:&lt;/p&gt;
&lt;pre class="code bash"&gt;&lt;a name="rest_code_9164fbe42bdf45d1b5b550468792f4cc-1"&gt;&lt;/a&gt;aptitude versions &lt;span class="s1"&gt;'~W(~Awheezy-backports(~W(~i!~M)))'&lt;/span&gt;
&lt;a name="rest_code_9164fbe42bdf45d1b5b550468792f4cc-2"&gt;&lt;/a&gt;aptitude versions &lt;span class="s1"&gt;'~W(~Aexperimental(~W(~i!~M)))'&lt;/span&gt;
&lt;/pre&gt;&lt;ul class="simple"&gt;
&lt;li&gt;&lt;tt class="docutils literal"&gt;~W&lt;/tt&gt; ignores the version selected by another filter.&lt;/li&gt;
&lt;li&gt;&lt;tt class="docutils literal"&gt;~Axxx&lt;/tt&gt; select packages from archive &lt;tt class="docutils literal"&gt;xxx&lt;/tt&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Lists upgradable packages:&lt;/p&gt;
&lt;pre class="code bash"&gt;&lt;a name="rest_code_8cccd29f8cf844c294f8eff43e5e2aeb-1"&gt;&lt;/a&gt;aptitude search ~U
&lt;/pre&gt;&lt;p&gt;With version numbers:&lt;/p&gt;
&lt;pre class="code bash"&gt;&lt;a name="rest_code_b2f3c64bde394ee68a668a2c0baafa8f-1"&gt;&lt;/a&gt;aptitude search --disable-columns -F&lt;span class="s1"&gt;'%p     %v      %V'&lt;/span&gt; ~U
&lt;/pre&gt;&lt;p&gt;Lists modified configuration files:&lt;/p&gt;
&lt;pre class="code bash"&gt;&lt;a name="rest_code_6cc4ed32f18e48f8820e71349effe008-1"&gt;&lt;/a&gt;sudo debsums -ce
&lt;/pre&gt;&lt;p&gt;Backup debconf configurations:&lt;/p&gt;
&lt;pre class="code bash"&gt;&lt;a name="rest_code_f13fac8dab0442b391e27c3f7b0f54dd-1"&gt;&lt;/a&gt;sudo debconf-get-selections &amp;gt; /tmp/conf-paquets.txt
&lt;/pre&gt;&lt;p&gt;To import as this befor installing packages:&lt;/p&gt;
&lt;pre class="code bash"&gt;&lt;a name="rest_code_54b3826deb6d4963836a7bd17f3f608c-1"&gt;&lt;/a&gt;sudo debconf-set-selections &amp;lt; /tmp/conf-paquets.txt
&lt;/pre&gt;&lt;p&gt;To be continued…&lt;/p&gt;&lt;/div&gt;</description><category>Debian</category><guid>http://hobgoblins-master.info/en/posts/pense-bete-aptitude.html</guid><pubDate>Wed, 15 Jan 2014 14:05:42 GMT</pubDate></item><item><title>Mise à jour Nikola V6</title><link>http://hobgoblins-master.info/en/posts/mise-a-jour-nikola-v6.html</link><dc:creator>Landry MINOZA</dc:creator><description>&lt;div&gt;&lt;p&gt;La version Debian de Nikola a été mise à jour en V6 il y a quelques temps. Ça a été l’occasion d’essayer d’optimiser un peu la configuration du blog et de supprimer les modifications en dur qui me permettaient d’afficher le bouton Flattr.&lt;/p&gt;
&lt;!-- TEASER_END --&gt;
&lt;p&gt;Les premiers tests après la mise à jour du paquet m’ont fait utiliser le theme oldfashioned, ce qui m’a permis de conserver exactement la même apparence avec mon thème « personnalisé ». Mais j’avait encore pas mal de Warnings à la construction du site.&lt;/p&gt;
&lt;p&gt;La seconde étape à donc été de mettre à jour le fichier conf.py de Nikola afin de l’adapter à la nouvelle version. J’ai généré un fichier de conf « propre » en créant un nouveau site, puis j’y ai incorporé toutes les modifications nécessaires, puis j’ai écrasé l’ancien. J’en ai profité pour tester l’interface en français (ça ne fonctionnait pas avec l’ancienne version). J’ai ensuite choisi le thème bootstrap (bootstrap3-gradients me plait bien, mais il semblerait que le paquet Debian ne soir pas prêt pour les thèmes bootstrap3).&lt;/p&gt;
&lt;p&gt;J’ai ensuite ajouté les bouton « saociaux », à la lecture de la &lt;a class="reference external" href="http://getnikola.com/social_buttons.html"&gt;page dédiée&lt;/a&gt;, j’ai décidé d’utiliser &lt;a class="reference external" href="https://github.com/panzi/SocialSharePrivacy"&gt;SocialSharePrivacy&lt;/a&gt; parce qu’il me permet d’utilser Flattr, qu’il reste discret, et surtout qu’il semble par défaut ne pas traquer les visiteurs de ce blog que ne le voudrait pas. J’avoue que j’ai ensuite un peu galéré pour l’intégrer correctement dans la page afin que le placement soit « harmonieux ».&lt;/p&gt;
&lt;p&gt;Dernière modification, l’ajout via le paramètre &lt;tt class="docutils literal"&gt;EXTRA_HEAD_DATA&lt;/tt&gt; d’une css custom dans laquelle je vais pouvoir faire quelques modifications su style par défaut – à commencer par la justification du texte des articles parce que l’alignement à droite, je trouve ça vraiment moche…&lt;/p&gt;
&lt;p&gt;Voilà, après un bon mois de procrastination et de tergiversations, je suis satisfait du résultat, je vais pouvoir pousser tout ça en production et me consacrer pleinement aux prochains articles techniques.&lt;/p&gt;&lt;/div&gt;</description><guid>http://hobgoblins-master.info/en/posts/mise-a-jour-nikola-v6.html</guid><pubDate>Tue, 07 Jan 2014 23:09:51 GMT</pubDate></item><item><title>check_by_ssh_wrapper</title><link>http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html</link><dc:creator>Landry MINOZA</dc:creator><description>&lt;div&gt;&lt;p&gt;Trying to mutualise Nagios services (or Shinken in my case) and NRPE configuration, sometimes a check returns to many data for NRPE or a host in DMZ don't have NRPE port accessible.&lt;/p&gt;
&lt;p&gt;On one infrastructure I monitor, while my NRPE configuration can check free disk space on local file systems (among other), I have a NAS in one DMZ with a lot of file systems (one LVM volume by share). The size of returned data, with Nagios perf data was above NRPE limit (1 kB). Rather than moving NRPE command line in Shinken services configuration and having to handle character escaping, rights and complexify Shinken configuration, I wrote this little script which use via &lt;tt class="docutils literal"&gt;check_by_ssh&lt;/tt&gt; the same parameters than &lt;tt class="docutils literal"&gt;check_nrpe&lt;/tt&gt; and read NRPE configuration one the client host to validate the command and execute it.&lt;/p&gt;
&lt;!-- TEASER_END --&gt;
&lt;div class="section" id="the-code"&gt;
&lt;h2&gt;The code&lt;/h2&gt;
&lt;p&gt;It is a simple bash script, hosted on &lt;a class="reference external" href="https://github.com/hobgoblinsmaster/check_by_ssh_wrapper"&gt;GitHub&lt;/a&gt;. At time of writing this post, the code is:&lt;/p&gt;
&lt;table class="codetable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-1"&gt; 1&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-2"&gt; 2&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-3"&gt; 3&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-4"&gt; 4&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-5"&gt; 5&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-6"&gt; 6&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-7"&gt; 7&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-8"&gt; 8&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-9"&gt; 9&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-10"&gt;10&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-11"&gt;11&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-12"&gt;12&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-13"&gt;13&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-14"&gt;14&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-15"&gt;15&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-16"&gt;16&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-17"&gt;17&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-18"&gt;18&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-19"&gt;19&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-20"&gt;20&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-21"&gt;21&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-22"&gt;22&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-23"&gt;23&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-24"&gt;24&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-25"&gt;25&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-26"&gt;26&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-27"&gt;27&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-28"&gt;28&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-29"&gt;29&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-30"&gt;30&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-31"&gt;31&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-32"&gt;32&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-33"&gt;33&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-34"&gt;34&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-35"&gt;35&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-36"&gt;36&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-37"&gt;37&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-38"&gt;38&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-39"&gt;39&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-40"&gt;40&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-41"&gt;41&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-42"&gt;42&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-43"&gt;43&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-44"&gt;44&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-45"&gt;45&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-46"&gt;46&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-47"&gt;47&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-48"&gt;48&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-49"&gt;49&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-50"&gt;50&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-51"&gt;51&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-52"&gt;52&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-53"&gt;53&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-54"&gt;54&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-55"&gt;55&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-56"&gt;56&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-57"&gt;57&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-58"&gt;58&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-59"&gt;59&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-60"&gt;60&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-61"&gt;61&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-62"&gt;62&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-63"&gt;63&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-64"&gt;64&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-65"&gt;65&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-66"&gt;66&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-67"&gt;67&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-68"&gt;68&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-69"&gt;69&lt;/a&gt;
&lt;a href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#rest_code_d298a16652fa41c3861c19b857501c1b-70"&gt;70&lt;/a&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre class="code bash"&gt;&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-1"&gt;&lt;/a&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-2"&gt;&lt;/a&gt;&lt;span class="c"&gt;#&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-3"&gt;&lt;/a&gt;&lt;span class="c"&gt;# check_by_ssh_wrapper&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-4"&gt;&lt;/a&gt;&lt;span class="c"&gt;#&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-5"&gt;&lt;/a&gt;&lt;span class="c"&gt;# This script provides access to commands declared in nrpe to check_by_ssh&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-6"&gt;&lt;/a&gt;&lt;span class="c"&gt;# Please set the nrpeconf variable to the right value&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-7"&gt;&lt;/a&gt;&lt;span class="c"&gt;# You must generate a ssh key on the nagios server, copy it in .ssh/authorized_keys&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-8"&gt;&lt;/a&gt;&lt;span class="c"&gt;# in nagios (or nrpe) user home directory on distant server, then add this at&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-9"&gt;&lt;/a&gt;&lt;span class="c"&gt;# the begining of the line juste before the key:&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-10"&gt;&lt;/a&gt;&lt;span class="c"&gt;# no-pty,no-port-forwarding,command="/usr/local/bin/check_by_ssh_wrapper $SSH_ORIGINAL_COMMAND"&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-11"&gt;&lt;/a&gt;&lt;span class="c"&gt;#&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-12"&gt;&lt;/a&gt;&lt;span class="c"&gt;# You can the use $USER1$/check_by_ssh -H &amp;lt;distant host&amp;gt; -l nagios -C 'check_cmd [args]'&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-13"&gt;&lt;/a&gt;&lt;span class="c"&gt;#&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-14"&gt;&lt;/a&gt;&lt;span class="c"&gt;# Freely inspired by nagios_ssh_framework. Can be used when nrpe port can't be accessed&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-15"&gt;&lt;/a&gt;&lt;span class="c"&gt;# or check_command returns to many text for nrpe and you want to keep facilities of nrpe&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-16"&gt;&lt;/a&gt;&lt;span class="c"&gt;# config files.&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-17"&gt;&lt;/a&gt;&lt;span class="c"&gt;#&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-18"&gt;&lt;/a&gt;&lt;span class="c"&gt;# Changes an Modifications:&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-19"&gt;&lt;/a&gt;&lt;span class="c"&gt;# 2011-10-12 - Landry MINOZA - V 1.0&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-20"&gt;&lt;/a&gt;&lt;span class="c"&gt;# Created because check_disks returns to many lines for nrpe with one of my servers&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-21"&gt;&lt;/a&gt;&lt;span class="c"&gt;#&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-22"&gt;&lt;/a&gt;&lt;span class="c"&gt;# Copyright: Telbase Formation Conseil, MUSEE D'ORSAY 2011&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-23"&gt;&lt;/a&gt;&lt;span class="c"&gt;#&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-24"&gt;&lt;/a&gt;&lt;span class="c"&gt;# This program is free software: you can redistribute it and/or modify&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-25"&gt;&lt;/a&gt;&lt;span class="c"&gt;# it under the terms of the GNU General Public License as published by&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-26"&gt;&lt;/a&gt;&lt;span class="c"&gt;# the Free Software Foundation, either version 3 of the License, or&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-27"&gt;&lt;/a&gt;&lt;span class="c"&gt;# (at your option) any later version.&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-28"&gt;&lt;/a&gt;&lt;span class="c"&gt;#&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-29"&gt;&lt;/a&gt;&lt;span class="c"&gt;# This program is distributed in the hope that it will be useful,&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-30"&gt;&lt;/a&gt;&lt;span class="c"&gt;# but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-31"&gt;&lt;/a&gt;&lt;span class="c"&gt;# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-32"&gt;&lt;/a&gt;&lt;span class="c"&gt;# GNU General Public License for more details.&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-33"&gt;&lt;/a&gt;&lt;span class="c"&gt;#&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-34"&gt;&lt;/a&gt;&lt;span class="c"&gt;# You should have received a copy of the GNU General Public License&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-35"&gt;&lt;/a&gt;&lt;span class="c"&gt;# along with this program.  If not, see &amp;lt;http://www.gnu.org/licenses/&amp;gt;.&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-36"&gt;&lt;/a&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-37"&gt;&lt;/a&gt;&lt;span class="c"&gt;# Set main nrpe.cfg file&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-38"&gt;&lt;/a&gt;&lt;span class="nv"&gt;nrpeconf&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/etc/nagios/nrpe.cfg
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-39"&gt;&lt;/a&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-40"&gt;&lt;/a&gt;&lt;span class="c"&gt;# Get cmdname&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-41"&gt;&lt;/a&gt;&lt;span class="nv"&gt;cmdname&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-42"&gt;&lt;/a&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; -z &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$cmdname&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-43"&gt;&lt;/a&gt;        &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"WARNING, no command name provided"&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-44"&gt;&lt;/a&gt;        &lt;span class="nb"&gt;exit &lt;/span&gt;1
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-45"&gt;&lt;/a&gt;&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-46"&gt;&lt;/a&gt;&lt;span class="nb"&gt;shift&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-47"&gt;&lt;/a&gt;&lt;span class="c"&gt;# Get optionnal args&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-48"&gt;&lt;/a&gt;&lt;span class="nv"&gt;cmdargs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$@&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-49"&gt;&lt;/a&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-50"&gt;&lt;/a&gt;&lt;span class="c"&gt;# Declare an array of commands&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-51"&gt;&lt;/a&gt;&lt;span class="nb"&gt;declare&lt;/span&gt; -A &lt;span class="nb"&gt;command&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-52"&gt;&lt;/a&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-53"&gt;&lt;/a&gt;&lt;span class="c"&gt;# find all nrpe conf files&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-54"&gt;&lt;/a&gt;&lt;span class="nv"&gt;include&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;sed -ne &lt;span class="s1"&gt;'/^include=/ s/^.*=// p'&lt;/span&gt; &lt;span class="nv"&gt;$nrpeconf&lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-55"&gt;&lt;/a&gt;&lt;span class="nv"&gt;include_dir&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;sed -ne &lt;span class="s1"&gt;'/^include_dir=/ s/^.*=// p'&lt;/span&gt; &lt;span class="nv"&gt;$nrpeconf&lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-56"&gt;&lt;/a&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-57"&gt;&lt;/a&gt;&lt;span class="c"&gt;# Parse all nrpe conf files for command[*]= arguments&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-58"&gt;&lt;/a&gt;&lt;span class="k"&gt;for&lt;/span&gt; cfgfile in &lt;span class="k"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; -e &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$nrpeconf&lt;/span&gt;&lt;span class="s2"&gt;\n&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;include&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;\n&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;include_dir&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;*.cfg"&lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt; &lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="k"&gt;do&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-59"&gt;&lt;/a&gt;        &lt;span class="nb"&gt;eval&lt;/span&gt; &lt;span class="k"&gt;$(&lt;/span&gt;sed -ne &lt;span class="s1"&gt;'/^command\[/ s/=\(.*\)$/="\1"/ p'&lt;/span&gt; &lt;span class="nv"&gt;$cfgfile&lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-60"&gt;&lt;/a&gt;&lt;span class="k"&gt;done&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-61"&gt;&lt;/a&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-62"&gt;&lt;/a&gt;&lt;span class="c"&gt;# Check if command[$cmdname] exists&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-63"&gt;&lt;/a&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; -z &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;command&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;$cmdname&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-64"&gt;&lt;/a&gt;        &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"WARNING, command &lt;/span&gt;&lt;span class="nv"&gt;$cmdname&lt;/span&gt;&lt;span class="s2"&gt; does not exist"&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-65"&gt;&lt;/a&gt;        &lt;span class="nb"&gt;exit &lt;/span&gt;1
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-66"&gt;&lt;/a&gt;&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-67"&gt;&lt;/a&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-68"&gt;&lt;/a&gt;&lt;span class="c"&gt;# Launch check&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-69"&gt;&lt;/a&gt;&lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;command&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;$cmdname&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="nv"&gt;$cmdargs&lt;/span&gt;
&lt;a name="rest_code_d298a16652fa41c3861c19b857501c1b-70"&gt;&lt;/a&gt;&lt;span class="nb"&gt;exit&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;The code can be divided in 8 parts:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Line 38, to customize, this is the path of NRPE configuration file (for Debian stable here).&lt;/li&gt;
&lt;li&gt;Line 40 to 48, command line parameters validation.&lt;/li&gt;
&lt;li&gt;Line 51, explicit (and mandatory) declaration of an associative array of commands, it is used to store for each command named in NRPE configuration the related command line.&lt;/li&gt;
&lt;li&gt;Line 54 and 55, retrieval of include and include_dir statement in nrpe.conf file to take into account the referenced files. &lt;strong&gt;Take care&lt;/strong&gt;, this include files research is not yet recusive, the statements are only analyzed in the main configuration file.&lt;/li&gt;
&lt;li&gt;Line 58 and 60, loop on list on found files.&lt;/li&gt;
&lt;li&gt;Line 59, this line is the core of the script, this is a trick base on NRPE configuration syntax, indeed, to declare a command in NRPE, one writes: &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;command[command_name]=command_line&lt;/span&gt; options&lt;/tt&gt;. Lines simply have to be extracted and the command line part (after “=”) have to be quoted, then this have to be executed via eval to fill the array &lt;em&gt;command&lt;/em&gt; declared before.&lt;/li&gt;
&lt;li&gt;Line 63, testing if a command whith the name given as parameter to the script exists.&lt;/li&gt;
&lt;li&gt;At last, line 69, execution of the specified command with his parameters. The explicit exit at the end, ensure that the exit state of the script is the same that the one of the executed command, and so transmited to Nagios.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="installation"&gt;
&lt;h2&gt;Installation&lt;/h2&gt;
&lt;p&gt;This script have to be installed on the monitored host, not on the monitoring server, for instance in &lt;tt class="docutils literal"&gt;/usr/local/bin&lt;/tt&gt;. The user executing NRPe daemon (on Debian, it is named nagios) must have execution rights on the script. By default, this user have no password set, and we do not want to set one. Anyway, this is generaly a bad idea to have passwords in Nagios configuration files. First, generate a SSH key pair on the monitoring server using the command &lt;tt class="docutils literal"&gt;ssh_keygen&lt;/tt&gt; as the monitoring daemon user. By default, this commande generates a RSA key, stores the private key in &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;$HOME/.ssh/id_rsa&lt;/span&gt;&lt;/tt&gt; and the public one in &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;$HOME/.ssh/id_rsa.pub&lt;/span&gt;&lt;/tt&gt;. This last is the one we want.&lt;/p&gt;
&lt;p&gt;On the monitored host, create in the &lt;tt class="docutils literal"&gt;$HOME&lt;/tt&gt; of the NRPE daemon user (&lt;tt class="docutils literal"&gt;/var/lib/nagios&lt;/tt&gt; on Debian) a directory named &lt;tt class="docutils literal"&gt;.ssh&lt;/tt&gt; whith unix rights &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;rwx------&lt;/span&gt;&lt;/tt&gt;&lt;/p&gt;
&lt;pre class="code bash"&gt;&lt;a name="rest_code_bf97a56ca0b4439db5c45bfcb551329f-1"&gt;&lt;/a&gt;mkdir /var/lib/nagios/.ssh
&lt;a name="rest_code_bf97a56ca0b4439db5c45bfcb551329f-2"&gt;&lt;/a&gt;chown nagios:nagios /var/lib/nagios/.ssh
&lt;a name="rest_code_bf97a56ca0b4439db5c45bfcb551329f-3"&gt;&lt;/a&gt;chmod &lt;span class="nv"&gt;u&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;rwx,go&lt;span class="o"&gt;=&lt;/span&gt; /var/lib/nagios/.ssh
&lt;/pre&gt;&lt;p&gt;In the folder, create a file named &lt;tt class="docutils literal"&gt;authorized_keys&lt;/tt&gt; containing the following line:&lt;/p&gt;
&lt;pre class="code text"&gt;&lt;a name="rest_code_ec6fb29d6f934bd696fb759a3fe98e0c-1"&gt;&lt;/a&gt;no-pty,no-port-forwarding,command="/usr/local/bin/check_by_ssh_wrapper $SSH_ORIGINAL_COMMAND" ssh-rsa AAAA… user@server
&lt;/pre&gt;&lt;p&gt;Replace &lt;tt class="docutils literal"&gt;AAAA… user@server&lt;/tt&gt; with the content of the file &lt;tt class="docutils literal"&gt;id_rsa.pub&lt;/tt&gt; generated on the server.
This line &lt;a class="footnote-reference" href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#id2" id="id1"&gt;[1]&lt;/a&gt; permits to allow only the command &lt;tt class="docutils literal"&gt;chaeck_by_ssh_wrapper&lt;/tt&gt; (only place here an absolute path) to be executed when connectiong with this SSH key and forbid ports forwarding and pseudo-tty allocation. The original command passed to ssh will be provided as parameter to our script via the variable &lt;tt class="docutils literal"&gt;$SSH_ORIGINAL_COMMAND&lt;/tt&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="using"&gt;
&lt;h2&gt;Using&lt;/h2&gt;
&lt;p&gt;In Nagios configuration, just create a new command object:&lt;/p&gt;
&lt;pre class="code text"&gt;&lt;a name="rest_code_125039f3beb34a71943b7c10c836a29c-1"&gt;&lt;/a&gt;define command{
&lt;a name="rest_code_125039f3beb34a71943b7c10c836a29c-2"&gt;&lt;/a&gt;        command_name check_by_ssh
&lt;a name="rest_code_125039f3beb34a71943b7c10c836a29c-3"&gt;&lt;/a&gt;        command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -t 60 -l nagios -C '$ARG1$ $ARG2$'
&lt;a name="rest_code_125039f3beb34a71943b7c10c836a29c-4"&gt;&lt;/a&gt;}
&lt;/pre&gt;&lt;p&gt;This can be used the same way than check_nrpe in services definitions:&lt;/p&gt;
&lt;pre class="code text"&gt;&lt;a name="rest_code_268095b07e9a4c769d3e06a59672871c-1"&gt;&lt;/a&gt;define service{
&lt;a name="rest_code_268095b07e9a4c769d3e06a59672871c-2"&gt;&lt;/a&gt;        use                     base-service
&lt;a name="rest_code_268095b07e9a4c769d3e06a59672871c-3"&gt;&lt;/a&gt;        service_description     check_disks
&lt;a name="rest_code_268095b07e9a4c769d3e06a59672871c-4"&gt;&lt;/a&gt;        display_name            Check Disks
&lt;a name="rest_code_268095b07e9a4c769d3e06a59672871c-5"&gt;&lt;/a&gt;        check_command           check_by_ssh!check_disks
&lt;a name="rest_code_268095b07e9a4c769d3e06a59672871c-6"&gt;&lt;/a&gt;}
&lt;/pre&gt;&lt;/div&gt;
&lt;div class="section" id="conclusion"&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;This is not perfect, it does not handle recusrive inclusions, but it work as I want since 2 years and permited me to simplify a lot the use of &lt;tt class="docutils literal"&gt;check_by_ssh&lt;/tt&gt; plugin, securing it as only commands declared in NRPE configuration are usable.&lt;/p&gt;
&lt;table class="docutils footnote" frame="void" id="id2" rules="none"&gt;
&lt;colgroup&gt;&lt;col class="label"&gt;&lt;col&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td class="label"&gt;&lt;a class="fn-backref" href="http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html#id1"&gt;[1]&lt;/a&gt;&lt;/td&gt;&lt;td&gt;I'm preparing a more complete post on ssh (and PuTTY).&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;&lt;/div&gt;</description><category>monitoring</category><category>shinken</category><category>ssh</category><guid>http://hobgoblins-master.info/en/posts/check_by_ssh_wrapper.html</guid><pubDate>Sun, 27 Oct 2013 17:00:00 GMT</pubDate></item><item><title>Debian on HP ENVY dv7, installation</title><link>http://hobgoblins-master.info/en/posts/debian-on-hp-envy-dv7-installation.html</link><dc:creator>Landry MINOZA</dc:creator><description>&lt;div&gt;&lt;p&gt;J’ai fait l’acquisition de cette nouvelle machine suite à l’autodestruction de mon ancien portable – un Dell XPS 15 qui n’était pourtant pas si vieux. Je devais bien entendu y installer ma distribution favorite, à savoir Debian (Sid parce que pour un desktop, c’est la meilleure version quand on connait un peu).&lt;/p&gt;
&lt;p&gt;Vu que je l’utilise de temps en temps, je désirais conserver l’OS Microsoft™ (version 8) pré-installé gentiment par HP, donc ce sera une installation multiboot (du coup pas de tout repos).&lt;/p&gt;
&lt;!-- TEASER_END --&gt;
&lt;div class="section" id="le-materiel"&gt;
&lt;h2&gt;Le matériel&lt;/h2&gt;
&lt;pre class="literal-block"&gt;
lshw -short -sanitize -numeric
Chemin matériel  Périphérique  Classe         Description
============================================================
                                  system         HP ENVY dv7 Notebook PC (E3C85EA#ABF)
/0                                bus            181D
/0/0                              memory         6GiB Mémoire Système
/0/0/0                            memory         2GiB SODIMM DDR3 Synchrone 1600 MHz (0,6 ns)
/0/0/1                            memory         4GiB SODIMM DDR3 Synchrone 1600 MHz (0,6 ns)
/0/c                              memory         128KiB BIOS
/0/38                             processor      Intel(R) Core(TM) i7-3610QM CPU @ 2.30GHz
/0/38/3a                          memory         32KiB L1 cache
/0/38/3b                          memory         256KiB L2 cache
/0/38/3c                          memory         6MiB L3 cache
/0/39                             memory         32KiB L1 cache
/0/100                            bridge         3rd Gen Core processor DRAM Controller [8086:154]
/0/100/1                          bridge         Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port [8086:151]
/0/100/1/0                        display        GF108M [GeForce GT 635M] [10DE:DE3]
/0/100/2                          display        3rd Gen Core processor Graphics Controller [8086:166]
/0/100/14                         bus            7 Series/C210 Series Chipset Family USB xHCI Host Controller [8086:1E31]
/0/100/16                         communication  7 Series/C210 Series Chipset Family MEI Controller #1 [8086:1E3A]
/0/100/1a                         bus            7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 [8086:1E2D]
/0/100/1b                         multimedia     7 Series/C210 Series Chipset Family High Definition Audio Controller [8086:1E20]
/0/100/1c                         bridge         7 Series/C210 Series Chipset Family PCI Express Root Port 1 [8086:1E10]
/0/100/1c.1                       bridge         7 Series/C210 Series Chipset Family PCI Express Root Port 2 [8086:1E12]
/0/100/1c.1/0                     generic        RTS5229 PCI Express Card Reader [10EC:5229]
/0/100/1c.3                       bridge         7 Series/C210 Series Chipset Family PCI Express Root Port 4 [8086:1E16]
/0/100/1c.3/0     wlan0           network        RT3290 Wireless 802.11n 1T/1R PCIe [1814:3290]
/0/100/1c.3/0.1                   generic        RT3290 Bluetooth [1814:3298]
/0/100/1c.5                       bridge         7 Series/C210 Series Chipset Family PCI Express Root Port 6 [8086:1E1A]
/0/100/1c.5/0     eth0            network        RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10EC:8168]
/0/100/1d                         bus            7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 [8086:1E26]
/0/100/1f                         bridge         HM77 Express Chipset LPC Controller [8086:1E57]
/0/100/1f.2                       storage        82801 Mobile SATA Controller [RAID mode] [8086:282A]
/0/100/1f.3                       bus            7 Series/C210 Series Chipset Family SMBus Controller [8086:1E22]
/0/1              scsi0           storage
/0/1/0.0.0        /dev/sda        disk           1TB HGST HTS541010A9
/0/1/0.0.0/1      /dev/sda1       volume         399MiB Windows NTFS volume
/0/1/0.0.0/2      /dev/sda2       volume         259MiB Windows FAT volume
/0/1/0.0.0/3      /dev/sda3       volume         127MiB reserved partition
/0/1/0.0.0/4      /dev/sda4       volume         146GiB Windows NTFS volume
/0/1/0.0.0/5      /dev/sda5       volume         28GiB Windows NTFS volume
/0/1/0.0.0/6      /dev/sda6       volume         755GiB LVM Physical Volume
/0/2              scsi4           storage
/0/2/0.0.0        /dev/cdrom      disk           DVD A  DS8A9SH
/1                                power          MO06062
/2                                power          OEM_Define5
&lt;/pre&gt;
&lt;p&gt;Comme je pense la plupart des machines récentes, l’antique BIOS a été remplacé par &lt;a class="reference external" href="http://fr.wikipedia.org/wiki/UEFI"&gt;UEFI&lt;/a&gt;.
Il y a également 2 cartes graphiques, la carte Intel intégrée et une GeForce Nvidia, le tout saupoudré de technologie Optimus.
Les cartes réseaux nécessitent des micrologiciels propriétaires, les paquets suivants devront donc être installés :&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;firmware-ralink&lt;/li&gt;
&lt;li&gt;firmware-realtek&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="preparation"&gt;
&lt;h2&gt;Préparation&lt;/h2&gt;
&lt;p&gt;Afin d’avoir ces micrologiciels dès l’installation, j’ai choisi d’utiliser le média d’installation alternatif comme indiqué sur le &lt;a class="reference external" href="https://wiki.debian.org/fr/firmware"&gt;wiki Debian&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Il faut également de la place pour installer Debian sur le disque, j’ai choisi la facilité : réduire la taille de la partition Windows™ avec gparted en démarrant sur un &lt;a class="reference external" href="http://www.sysresccd.org/"&gt;SystemRescueCd&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Je ne m’amuse plus à graver de CD depuis un moment, donc autant pour SystemRescueCd que pour Debian, le démarrage aura lieu sur une clé USB. Pour SystemRescueCd, c’est bien expliqué sur le site officiel, pour l’ISO netinstall de Debian, c’est simple, il suffit d’utiliser la commande &lt;tt class="docutils literal"&gt;dd&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;Concernant Secure Boot, je n’ai pas eu envie de chercher, je l’ai juste désactivé pour le moment.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="installation"&gt;
&lt;h2&gt;Installation&lt;/h2&gt;
&lt;p&gt;L’installation est très classique pour qui a déjà installé une Debian, il est même possible de lancer le téléchargement des paquets en Wi-Fi, attention cependant, à ce jour, la configuration Wi-Fi n’est pas conservée dans le fichier &lt;tt class="docutils literal"&gt;/etc/network/interfaces&lt;/tt&gt; donc pas de réseau au premier boot…&lt;/p&gt;
&lt;p&gt;Afin d’éviter les surprises, et réinstaller tout ce que j’avais sur l’ancienne machine, j’ai réalisé une installation minimale puis j’ai réinstallé tous les paquets installés manuellement dont je récupère la liste grâce à la commande suivante :&lt;/p&gt;
&lt;pre class="code bash"&gt;&lt;a name="rest_code_2c00491aa36c46799b6ee185160d1b61-1"&gt;&lt;/a&gt;aptitude search -F%p ~i&lt;span class="se"&gt;\!&lt;/span&gt;~M
&lt;/pre&gt;&lt;p&gt;Il y a ensuite plusieurs façons d’installer cette liste de paquets, j’ai choisi la suivante :&lt;/p&gt;
&lt;pre class="code bash"&gt;&lt;a name="rest_code_d19af6ba89274b3cb98c961fdbddae34-1"&gt;&lt;/a&gt;cat installed &lt;span class="p"&gt;|&lt;/span&gt;xargs aptitude -s install
&lt;a name="rest_code_d19af6ba89274b3cb98c961fdbddae34-2"&gt;&lt;/a&gt;cat installed &lt;span class="p"&gt;|&lt;/span&gt;xargs aptitude -y install
&lt;/pre&gt;&lt;p&gt;Pour récupérer mes données, j’ai commencé par éditer &lt;tt class="docutils literal"&gt;/etc/passwd&lt;/tt&gt; et &lt;tt class="docutils literal"&gt;/etc/group&lt;/tt&gt; pour recréer mon login avec les mêmes valeurs, un coup de &lt;tt class="docutils literal"&gt;passwd&lt;/tt&gt; pour inscrire mon mot de passe dans &lt;tt class="docutils literal"&gt;/etc/shadow&lt;/tt&gt;. Puis un &lt;tt class="docutils literal"&gt;rsync&lt;/tt&gt; de mon &lt;tt class="docutils literal"&gt;/home&lt;/tt&gt; depuis le disque de l’ancien portable vers le nouveau.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="uefi-hp-et-dual-boot"&gt;
&lt;h2&gt;UEFI HP et dual-boot&lt;/h2&gt;
&lt;p&gt;Le sélecteur de démarrage est bogué, il ne retient pas l’ordre indiqué par &lt;tt class="docutils literal"&gt;efibootmgr&lt;/tt&gt; ou son équivalent sous Windows™, j’ai essayé diverses solutions glanées sur le net et testé &lt;a class="reference external" href="http://www.rodsbooks.com/refind/"&gt;rEFInd&lt;/a&gt;, rien à faire, le démarrage par défaut se fait toujours sous Windows™. Et rEFInd finalement fait double emploi avec GRUB. J’ai donc opté pour une solution manuelle :&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Tout d’abord, il faut récupérer la configuration générée par GRUB pour démarrer Windows™ dans &lt;tt class="docutils literal"&gt;/boot/grub/grub.cfg&lt;/tt&gt;, ça va nous servir :&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="literal-block"&gt;
menuentry "Windows Boot Manager (UEFI on /dev/sda2)" --class windows --class os {
      insmod part_gpt
      insmod fat
      set root='(hd0,gpt2)'
      search --no-floppy --fs-uuid --set=root 3EE5-0D31
      chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
&lt;/pre&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Ensuite, on neutralise la configuration par défaut en déplaçant le fichier &lt;tt class="docutils literal"&gt;/boot/efi/EFI/Microsoft/Boot/bootmgfw.efi&lt;/tt&gt; (je l’ai mis dans le répertoire &lt;tt class="docutils literal"&gt;/boot/efi/EFI/Microsoft&lt;/tt&gt;) et en renommant le fichier &lt;tt class="docutils literal"&gt;/boot/efi/EFI/Boot/bootx64.efi&lt;/tt&gt; (qui n’est q’une copie du premier) en &lt;tt class="docutils literal"&gt;.old&lt;/tt&gt; par exemple.&lt;/li&gt;
&lt;li&gt;À ce stade, je me suis retrouvé avec grub comme boot par défaut, si d’autres installations existent et entrent en conflit, il faudrait copier le fichier &lt;tt class="docutils literal"&gt;grubx64.efi&lt;/tt&gt; correspondant en &lt;tt class="docutils literal"&gt;/boot/efi/Boot/bootx64.efi&lt;/tt&gt; (j’ai préféré ne pas le faire pour m’éviter d’oublier cette opération manuelle à la prochaine mise à jour de GRUB). Je me retrouve donc avec la liste d’éléments bootables suivante :&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="literal-block"&gt;
sudo efibootmgr
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 3002,0003,0004,2001,2002,2003
Boot0002* debian
Boot0003* Network Adapter (IPv4 UEFI)
Boot0004* Network Adapter (IPv6 UEFI)
Boot2001* USB Drive (UEFI)
Boot2002* Internal CD/DVD ROM Drive (UEFI)
Boot3002* Internal Hard Disk or Solid State Disk
&lt;/pre&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Le Windows™ n’est plus bootable, et le générateur de configuration GRUB ne le trouve plus non plus, il faut l’ajouter manuellement en copiant la configuration récupérée précédemment à la fin du fichier &lt;tt class="docutils literal"&gt;/etc/grub.d/40_custom&lt;/tt&gt;, ajuster les chemins en fonction de l’endroit où on a déplacé le fichier &lt;tt class="docutils literal"&gt;bootmgfw.efi&lt;/tt&gt;. Enfin il faut mettre à jour la configuration de GRUB (&lt;tt class="docutils literal"&gt;sudo &lt;span class="pre"&gt;update-grub&lt;/span&gt;&lt;/tt&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="conclusion"&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Tout fonctionne à peut près correctement, &lt;tt class="docutils literal"&gt;kdm&lt;/tt&gt; se lance sans toucher à la configuration de &lt;tt class="docutils literal"&gt;xorg&lt;/tt&gt; (franchement, je ne m’y attendais pas), même si je ne sais pas quelle carte graphique est utilisée, le fichier de log &lt;tt class="docutils literal"&gt;xorg&lt;/tt&gt; montre le chargement des pilotes intel et nouveau (je pense essayer Bumblebee bientôt). Le bluetooth intégré à la carte Wi-Fi ne fonctionne pas, d’après ce que j’ai lu rapidement, un pilote existe sur le site du constructeur, mais il ne compilerait pas sur un noyau plus récent que le 3.2. Je mettrais un billet si j’arrive à en sortir quelque chose.&lt;/p&gt;
&lt;!-- Collection de liens --&gt;
&lt;/div&gt;&lt;/div&gt;</description><guid>http://hobgoblins-master.info/en/posts/debian-on-hp-envy-dv7-installation.html</guid><pubDate>Thu, 10 Oct 2013 14:48:19 GMT</pubDate></item></channel></rss>