Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-release > by-pkgid > 97a539d9520e53e0b463b6f8e0284aa4 > files > 41

caspar-20120530-7.mga6.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Copyright (c) 2012 Joost van Baal-Ilić -->
<head>
<meta name="keywords" content="manual">
<style type="text/css">
/* START aephea.base.css */
body
{ text-align: justify;
margin-left: 0%;
margin-right: 0%;
}
a:link { text-decoration: none; }
a:active { text-decoration: none; }
a:visited { text-decoration: none; }
a:link { color: #1111aa; }
a:active { color: #1111aa; }
a:visited { color: #111166; }
a.local:link { color: #11aa11; }
a.local:active { color: #11aa11; }
a.local:visited { color: #116611; }
a.intern:link { color: #1111aa; }
a.intern:active { color: #1111aa; }
a.intern:visited { color: #111166; }
a.extern:link { color: #aa1111; }
a.extern:active { color: #aa1111; }
a.extern:visited { color: #661111; }
a.quiet:link { color: black; }
a.quiet:active { color: black; }
a.quiet:visited { color: black; }
div.verbatim
{ font-family: monospace;
margin-top: 1em;
margin-bottom: 1em;
font-size: 10pt;
margin-left: 2em;
white-space: pre;
}
div.indent
{ margin-left: 8%;
margin-right: 0%;
}
.right { text-align: right; }
.left { text-align: left; }
.nowrap { white-space: nowrap; }
.item_leader
{ position: relative;
margin-left: 8%;
}
.item_compact { position: absolute; vertical-align: baseline; }
.item_cascade { position: relative; }
.item_leftalign { text-align: left; }
.item_rightalign
{ width: 2em;
text-align: right;
}
.item_compact .item_rightalign
{ position: absolute;
width: 52em;
right: -2em;
text-align: right;
}
.item_text
{ position: relative;
margin-left: 3em;
}
.smallcaps { font-size: smaller; text-transform: uppercase }
/* END aephea.base.css */
body { font-family: "Garamond", "Gill Sans", "Verdana", sans-serif; }
body
{ text-align: justify;
margin-left: 8%;
margin-right: 8%;
}
</style>
<title>csp_helper</title>
</head>
<body>
<p style="text-align:right">
14 mai 2012&nbsp;&nbsp;&nbsp;
<a class="local" href="csp_helper.ps"><b>csp_helper</b></a>
20120514
</p>
<div class=" itemize " style="margin-top:1em; font-size:100%">
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">1.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#name">NAME</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">2.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#synopsis">SYNOPSIS</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">3.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#description">DESCRIPTION</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">4.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#install_description">install DESCRIPTION</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">5.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#install_examples">install EXAMPLES</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">6.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#install_environment">install ENVIRONMENT</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">7.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#mkdircp_description">mkdircp DESCRIPTION</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">8.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#scp_keep_mode_description">scp_keep_mode DESCRIPTION</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">9.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#scp_keep_mode_examples">scp_keep_mode EXAMPLE</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">10.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#scp_keep_mode_environment">scp_keep_mode ENVIRONMENT</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">11.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#sucp_description">sucp DESCRIPTION</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">12.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#sucp_examples">sucp EXAMPLES</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">13.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#sucp_bugs">sucp BUGS</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">14.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#author">AUTHOR</a>
</div>
<div class=" item_compact"><div class=" item_rightalign nowrap " style="right:-3em">15.</div></div>
<div class=" item_text " style="margin-left:4em">
<a class="intern" href="#seealso">SEE ALSO</a>
</div>
</div>

<a name="name"></a>
<h2>NAME</h2>
<p style="margin-bottom:0" class="asd_par">
csp_helper &mdash; A collection of caspar helper scripts</p>

<a name="synopsis"></a>
<h2>SYNOPSIS</h2>
<b>csp_install</b> <a class="intern" href="#optdir"><b>dir</b> (<i>directory</i>)</a> <a class="intern" href="#optfile"><b>file</b> (<i>file</i>)</a>
<p style="margin-bottom:0" class="asd_par">
<b>csp_mkdircp</b> <a class="intern" href="#optdir"><b>dir</b> (<i>directory</i>)</a> <a class="intern" href="#optfile"><b>file</b> (<i>file</i>)</a>
</p> <p style="margin-bottom:0" class="asd_par">
<b>csp_scp_keep_mode</b> <a class="intern" href="#opth"><b>h</b> (<i>[user@]host</i>)</a> <a class="intern" href="#optdir"><b>dir</b> (<i>directory</i>)</a> <a class="intern" href="#optfile"><b>file</b> (<i>file</i>)</a>
</p> <p style="margin-bottom:0" class="asd_par">
<b>csp_sucp</b>
<a class="intern" href="#opth"><b>h</b> (<i>[user@]host</i>)</a>
<a class="intern" href="#optdir"><b>dir</b> (<i>directory</i>)</a>
<a class="intern" href="#optfile"><b>file</b> (<i>file</i>)</a>
</p>

<a name="description"></a>
<h2>DESCRIPTION</h2>
The scripts <b>csp_install</b>, <b>csp_mkdircp</b>, <b>csp_scp_keep_mode</b> and <b>csp_sucp</b> are helpers for
<a class="local sibling" href="caspar.html">caspar(7)</a>. These scripts typically are not invoked directly,
but via a Makefile which uses <b>caspar</b>. See the notes on csp_PUSH in
<a class="local sibling" href="caspar.html">caspar(7)</a> for information on how to link <b>csp_install</b>,
<b>csp_scp_keep_mode</b> and <b>csp_sucp</b> to <b>caspar</b>.

<a name="install_description"></a>
<h2>install DESCRIPTION</h2>
<b>csp_install</b> creates the required directory (if needed) and installs the file,
preserving timestamps. It uses install(1).

<a name="install_examples"></a>
<h2>install EXAMPLES</h2>
<div class="verbatim">
 csp_INSTALL_OPTIONS='--owner=www-data --group=www-data' \
  csp_INSTALL_MODE=ugo=r \
  csp_install /srv/www index.html</div>
<div class="verbatim">
 csp_INSTALL_MODE=u=rwx,go= csp_install /usr/local/sbin mkpasswd</div>

<a name="install_environment"></a>
<h2>install ENVIRONMENT</h2>
<b>csp_install</b> honors csp_INSTALL_OPTIONS and csp_INSTALL_MODE (default is
u=rw,go=r).

<a name="mkdircp_description"></a>
<h2>mkdircp DESCRIPTION</h2>
<b>csp_mkdircp</b> calls mkdir(1) and cp(1).

<a name="scp_keep_mode_description"></a>
<h2>scp_keep_mode DESCRIPTION</h2>
<b>csp_scp_keep_mode</b> uses ssh to copy a file to a remote host, keeping its file
permission mode. The trick used is a combination of mktemp(1) and mv(1).
Useful if you'd like to be sure a file gets installed e.g. group writable,
without fiddling with permission bits on the remote host.

<a name="scp_keep_mode_examples"></a>
<h2>scp_keep_mode EXAMPLE</h2>
<div class="verbatim">
  chmod g+w rc
  csp_scp_keep_mode root@gandalf /etc/uruk rc</div>

<a name="scp_keep_mode_environment"></a>
<h2>scp_keep_mode ENVIRONMENT</h2>
<b>csp_scp_keep_mode</b> honors csp_SSH ("ssh" by default).

<a name="sucp_description"></a>
<h2>sucp DESCRIPTION</h2>
<b>csp_sucp</b> calls cat(1) from within sudo(1) from within ssh(1). This allows one
to copy files to accounts on hosts one can only reach by calling sudo on the
ssh-reachable remote host.
<p style="margin-bottom:0" class="asd_par">
Typically, one wants to install a root-owned file, but one does not want to
allow access to the root-account directly from ssh. Typically sudo is used as
an extra line of defense.
</p>

<a name="sucp_examples"></a>
<h2>sucp EXAMPLES</h2>
Some examples:
<div class="verbatim">
  csp_sucp rms@bilbo /etc fstab</div>
<div class="verbatim">
  csp_sucp monty-python commit/ trailer.txt</div>

<a name="sucp_bugs"></a>
<h2>sucp BUGS</h2>
If NOPASSWD is not set in the sudoers(5) file, and one's timestamp is expired,
<b>csp_sucp</b> will forward the sudo password prompt. The given password <tt>will</tt>
be echoed on the console!

<a name="author"></a>
<h2>AUTHOR</h2>
Joost van Baal-Ilić

<a name="seealso"></a>
<h2>SEE ALSO</h2>
<a class="local sibling" href="caspar.html">caspar(7)</a>
The caspar homepage is at <a class="extern" href="http://mdcc.cx/caspar/">http://mdcc.cx/caspar/</a> .
</body>
</html>