Skip to content
Snippets Groups Projects
Commit ee98037d authored by Eric Vidal's avatar Eric Vidal :speech_balloon:
Browse files

fix merge conflict

parents bf80cbac db4a0812
No related branches found
No related tags found
No related merge requests found
Showing
with 52 additions and 825 deletions
......@@ -14,5 +14,8 @@ build:
- make -j9 man
- make -j9 install DESTDIR=gitlab-ci
- make -j9 install-man DESTDIR=gitlab-ci
only:
refs:
- master
......@@ -10,7 +10,7 @@ Build Instructions
- execline version 2.5.1.0 or later: http://skarnet.org/software/execline/
- s6 version 2.8.0.1 or later: http://skarnet.org/software/s6/
- s6-rc version 0.5.0.0 or later: http://skarnet.org/software/s6-rc/
- oblibs version 0.0.1.3 or later: https://framagit.org/Obarun/oblibs/
- oblibs version 0.0.2.0 or later: https://framagit.org/Obarun/oblibs/
- scdoc version 1.9.4 or later for man pages: https://git.sr.ht/~sircmpwn/scdoc
This software will run on any operating system that implements
......
......@@ -62,7 +62,7 @@ INSTALL_DATA += init.conf
INSTALL_MAN := $(wildcard doc/man/*.[1-8])
INSTALL_HTML := $(wildcard doc/html/*.html)
INSTALL_DATA := skel/halt skel/init skel/ishell skel/poweroff skel/rc.init \
skel/rc.shutdown skel/reboot skel/shutdown
skel/rc.shutdown skel/reboot skel/shutdown skel/rc.shutdown.final
INSTALL_CONF := skel/init.conf
all: $(ALL_LIBS) $(ALL_BINS) $(ALL_INCLUDES)
......
......@@ -30,18 +30,19 @@ Fine tuning of the installation directories:
--shebangdir=DIR absolute path for execline #\! invocations [BINDIR]
--livedir=DIR default live directory [/run/66]
--with-skeleton=DIR skeleton files directory installation [SYSDIR/66]
--with-system-log=DIR system service log directory[/var/log/66]
--with-system-dir=DIR 66 tools system working directory[/var/lib/66]
--with-system-service=DIR system service frontend directory[DATAROOTDIR/66/service]
--with-system-log=DIR system service log directory [/var/log/66]
--with-s6-log-user=USER user for running s6-log program [root]
--with-system-dir=DIR 66 tools system working directory [/var/lib/66]
--with-system-service=DIR system service frontend directory [DATAROOTDIR/66/service]
--with-sysadmin-service=DIR sysadmin service frontend directory[SYSDIR/66/service]
--with-sysadmin-service-conf=DIR sysadmin service configuration file directory[SYSDIR/66/conf]
--with-sysadmin-service=DIR sysadmin service frontend directory [SYSDIR/66/service]
--with-sysadmin-service-conf=DIR sysadmin service configuration file directory [SYSDIR/66/conf]
--with-user-dir=DIR 66 tools user working directory[.66]
--with-user-log=DIR user service log directory[.66/log]
--with-user-service=DIR user service directory[.66/service]
--with-user-service-conf=DIR user service configuration directory[.66/conf]
--with-user-dir=DIR 66 tools user working directory [.66]
--with-user-log=DIR user service log directory [.66/log]
--with-user-service=DIR user service directory [.66/service]
--with-user-service-conf=DIR user service configuration directory [.66/conf]
Do not set an absolute path but a \$HOME relative path for --with-user-dir,
--with-user-log, --with-user-service, --with-user-service-conf. The \$HOME prefix
......@@ -169,6 +170,7 @@ livedir='/run/66'
skel='$sysconfdir/66'
system_dir='/var/lib/66'
system_log='/var/log/66'
s6log_user='root'
service_system='$datarootdir/66/service'
service_adm='$sysconfdir/66/service'
service_admconf='$sysconfdir/66/conf'
......@@ -214,6 +216,7 @@ for arg ; do
--with-skeleton=*) skel=${arg#*=} ;;
--with-system-dir=*) system_dir=${arg#*=} ;;
--with-system-log=*) system_log=${arg#*=} ;;
--with-s6-log-user=*) s6log_user=${arg#*=} ;;
--with-system-service=*) service_system=${arg#*=} ;;
--with-sysadmin-service=*) service_adm=${arg#*=} ;;
--with-sysadmin-service-conf=*) service_admconf=${arg#*=} ;;
......@@ -365,6 +368,7 @@ if test -n "$target" && test x${build} != x${target} ; then
else
cross=
fi
echo "Checking for C compiler..."
trycc ${CC}
if test -n "$CC_AUTO" ; then
......@@ -503,6 +507,7 @@ livedir := $livedir
skel := $skel
system_dir := $system_dir
system_log := $system_log
s6log_user := $s6log_user
service_system := $service_system
service_adm := $service_adm
service_admconf := $service_admconf
......@@ -581,6 +586,7 @@ All rights reserved.*/
#define ${package_macro_name}_SYSTEM_DIR "$system_dir/"
#define ${package_macro_name}_SKEL_DIR "$sysconfdir/66/"
#define ${package_macro_name}_LOGGER_SYSDIR "$system_log/"
#define ${package_macro_name}_LOGGER_RUNNER "$s6log_user"
#define ${package_macro_name}_SERVICE_SYSDIR "$service_system/"
#define ${package_macro_name}_SERVICE_ADMDIR "$service_adm/"
#define ${package_macro_name}_SERVICE_ADMCONFDIR "$service_admconf/"
......
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="en" />
<title>The 66 Suite: 66-envfile</title>
<meta name="Description" content="Detailed documentation for the 66-envfile command which is part of the 66 software suite" />
<meta name="Keywords" content="66 command 66-envfile service supervision execute script execline environment importas" />
<!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> -->
</head>
<body>
<p>
<a href="index.html">66</a><br />
<a href="//obarun.org/">www.obarun.org</a>
</p>
<h1> 66-envfile</h1>
<p>
<strong>Deprecated</strong>. See <a href="execl-envfile.html">execl-envfile</a> instead.
</p>
</body>
</html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="en" />
<title>The 66 Suite: 66-getenv</title>
<meta name="Description" content="Detailed documentation for the 66-getenv command which is part of the 66 software suite" />
<meta name="Keywords" content="66 command 66-getenv service supervision execute script execline environment write" />
<!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> -->
</head>
<body>
<p>
<a href="index.html">66</a><br />
<a href="//obarun.org/">www.obarun.org</a>
</p>
<h1>66-getenv</h1>
<p>
66-getenv gets and displays the environment variables of a process name.
</p>
<h2> Interface </h2>
<pre>
66-getenv [ -h ] [ -x ] [ -d <em>delim</em> ] <em>process</em>
</pre>
<ul>
<li>
66-getenv find the corresponding pid of the <em>process</em> name applying a regex search.
</li>
<li>
It open and read <tt>/proc/&ltpid&gt/environ</tt> file and displays its contain.
</li>
<li>Return 0 on success and 111 on fail.</li>
</ul>
<h2> Options </h2>
<ul>
<li> <tt>-h&nbsp;</tt>&nbsp;: prints this help. </li>
<li>
<tt>-x&nbsp;</tt>: match exactly with the process name. It can be a complete command line, in such case its must be double-quoted.
</li>
<li>
<tt>-d&nbsp;<em>delim</em>&nbsp;</tt>&nbsp;: specify output delimiter. The default is <tt>'\n'</tt> character.
</li>
</ul>
<h2>Example of use</h2>
<p>66-getenv -x jwm</p>
<p>66-getenv "ck-launch-session jwm"</p>
<h2>Notes</h2>
<p> The file <tt>/proc/&ltpid&gt/environ</tt> contains the initial environment that was set when the currently executing program was started via <tt>execve(2)</tt>. If, after an <tt>execve(2)</tt>, the process modifies its environment
(e.g., by calling functions such as <tt>putenv(3)</tt> or modifying the <tt>environ(7)</tt> variable directly), this file will <strong>not</strong> reflect those changes&mdash;see <tt>proc(5)</tt> for futher informations.</p>
</body>
</html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="en" />
<title>The 66 Suite: 66-gnwenv</title>
<meta name="Description" content="Detailed documentation for the 66-gnwenv command which is part of the 66 software suite" />
<meta name="Keywords" content="66 command 66-gnwenv service supervision execute script execline environment write" />
<!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> -->
</head>
<body>
<p>
<a href="index.html">66</a><br />
<a href="//obarun.org/">www.obarun.org</a>
</p>
<h1>66-gnwenv</h1>
<p>
66-gnwenv gets and writes the environment variables of a process name at a specific file location.
</p>
<h2> Interface </h2>
<pre>
66-gnwenv [ -h ] [ -x ] [ -m <em>mode</em> ] <em>process</em> <em>dir</em> <em>file</em>
</pre>
<ul>
<li>
66-gnwenv executes into <tt><a href="66-getenv.html">66-getenv</a> -x process</tt> <tt><a href="66-writenv.html">66-writenv</a> -m mode dir file</tt>. It does nothing else: it is just a convenience program.
<a href="66-getenv.html">66-getenv</a> read the environment variable of the <em>process</em>, and <a href="66-writenv.html">66-writenv</a> will write these variables into <em>dir/file</em> location.
</li>
<li>Return 0 on success and 111 on fail.</li>
</ul>
<h2> Options </h2>
<ul>
<li> <tt>-h&nbsp;</tt>&nbsp;: prints this help. </li>
<li>
<tt>-x&nbsp;</tt>: match exactly with the process name. It can be a complete command line, in such case its must be double-quoted.
</li>
<li>
<tt>-m&nbsp;<em>mode</em>&nbsp;</tt>&nbsp;: create <em>dir</em> with mode <em>mode</em> if it doesn't exist yet. Default is 0755.
</li>
</ul>
</body>
</html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="en" />
<title>The 66 Suite: execl-envfile</title>
<meta name="Description" content="Detailed documentation for the execl-envfile command which is part of the 66 software suite" />
<meta name="Keywords" content="66 command execl-envfile service supervision execute script execline environment importas" />
<!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> -->
</head>
<body>
<p>
<a href="index.html">66</a><br />
<a href="//obarun.org/">www.obarun.org</a>
</p>
<h1>66-which</h1>
<p>
66-which is a portable which command that checks if a command exists
and is executable in PATH or at specified path. It behaves slightly
different then the GNU which command.
</p>
<h2>Interface</h2>
<pre>
66-which [ -h ] [ -q | -a ] <em>command(s)</em>
</pre>
<p>
This tool expect to find valid command name or path, it will check
if they exists and are executable by the current user.
</p>
<ul>
<li>
It parse PATH for valid entries, applying a substitution of each
entry with its realpath and emilinating duplicates.
</li>
<li>
It parses that command given checking if it is a path or a name.
</li>
<li>
It prints each command found with the first PATH entry, otherwise
it print an error. By passing the <tt>-a</tt> option, it
searches and print command with all the PATH entries, even if it
been already found.
</li>
<h2>Options</h2>
<ul>
<li>
<tt><b>-h</b></tt> : print this help.
</li>
<li>
<tt><b>-a</b></tt> : print all. Search and print the command using
all the PATH entries, even after the command has already been
found.
</li>
<li>
<tt><b>-q</b></tt> : quiet. Do not print anything on stdout.
</li>
</ul>
<h2>Exit codes</h2>
<p>
<ul>
<li>
<tt><b>&nbsp;&nbsp;0</b></tt> : success; all the commands have
been found on the system
</li>
<li>
<tt><b>110</b></tt> : bad usage
</li>
<li>
<tt><b>111</b></tt> : system call failed or at least one
command hasn't been found.
</li>
</ul>
</p>
<h2>Example of use</h2>
<p>
Search for a command by using its name:
</p>
<pre>
$ 66-which 66-echo
/usr/bin/66-echo
</pre>
<p>
Check for a command by using its path:
</p>
<pre>
$ 66-which /usr/bin/66-echo
/usr/bin/66-echo
</pre>
<p>
Usage of <em>66-which</em> in a script:
</p>
<pre>
#!/usr/bin/execlineb -P
if { 66-which -q vgchange }
vgchange -ay
</pre>
<h2>Notes</h2>
<p>
66-which need at least one valid entry in PATH that exists on the
system. 66-which is often used on critical scripts, like the ones
booting the system, so it's important to check if PATH contains valid
entries for the current system.
</p>
<p>
66-which correctly handle the tilde <em>~</em> character for paths.
Beware that same shell, like bash, replaces this character with the
current user home path. To pass the correct string to 66-which,
containing the tilde character, use quoting like this: <tt>66-which
'~/.bin/gvr'</tt>.
</body>
</html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="en" />
<title>The 66 Suite: 66-writenv</title>
<meta name="Description" content="Detailed documentation for the 66-writenv command which is part of the 66 software suite" />
<meta name="Keywords" content="66 command 66-writenv service supervision execute script execline environment write" />
<!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> -->
</head>
<body>
<p>
<a href="index.html">66</a><br />
<a href="//obarun.org/">www.obarun.org</a>
</p>
<h1>66-writenv</h1>
<p>
66-writenv stores its environment variables at a specific file location.
</p>
<h2> Interface </h2>
<pre>
66-writenv [ -h ] [ -m <em>mode</em> ] <em>dir</em> <em>file</em>
</pre>
<ul>
<li>
This tool write its environment variables into <em>dir/file</em> under the classic format <tt>key=value</tt> pair and thoses one per line. <em>dir</em> must be an absolute path.
</li>
<li>Return 0 on success and 111 on fail.</li>
</ul>
<h2> Options </h2>
<ul>
<li> <tt>-h&nbsp;</tt>&nbsp;: prints this help. </li>
<li>
<tt>-m&nbsp;<em>mode</em>&nbsp;</tt>&nbsp;: create <em>dir</em> with mode <em>mode</em> if it doesn't exist yet. Default is 0755.
</li>
</ul>
</body>
</html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="en" />
<title>The 66 Suite: execl-cmdline</title>
<meta name="Description" content="Detailed documentation for the execl-cmdline command which is part of the 66 software suite" />
<meta name="Keywords" content="66 command execl-cmdline service supervision execute script execline" />
<!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> -->
</head>
<body>
<p>
<a href="index.html">66</a><br />
<a href="//obarun.org/">www.obarun.org</a>
</p>
<h1>execl-cmdline</h1>
<p>
This command parses a <em>command</em> line into an <a href="https://skarnet.org/software/execline"><tt>execline</tt></a> script.
</p>
<h2> Interface </h2>
<p>
As <a href="https://www.skarnet.org/software/execline/execlineb.html">execlineb</a> script:
</p>
<pre>
execl-cmdline -s { <em>command</em> }
</pre>
<ul>
<li>
<tt>execl-cmdline</tt> reads the <em>command</em> and removes all whitespace or 'no word' before executing.
</li>
<li>
<tt>execl-cmdline</tt> exits with the exit code of the <em>command</em>.
</li>
</ul>
<h2> Options </h2>
<ul>
<li>
<tt>-s&nbsp;</tt>&nbsp;: splits a command considered by <em>execline</em> scripting language as one word into separate words.
</li>
</ul>
<h2> Note and usage examples </h2>
<p><tt>execl-cmdline</tt> should be used at the end of <em>execline</em> scripts. If you want to run another program after the call of <tt>execl-cmdline</tt> you would need to use an
<a href="https://skarnet.org/software/execline/if.html"><tt>if</tt></a> command, <a href="https://skarnet.org/software/execline/foreground.html"><tt>foreground</tt></a>,
<a href="https://skarnet.org/software/execline/background.html"><tt>background</tt></a> or the likes.</p>
<p>
The following <em>command</em>:
<pre>
execl-cmdline { /usr/bin/ntpd -d "" -S }
</pre>
will result in:
<pre>
/usr/bin/ntpd "-d" "-S"
</pre>
</p>
<p>
This <em>command</em>:
<pre>
execl-cmdline -S { /usr/bin/ntpd "-d -S" }
</pre>
will result in:
<pre>
/usr/bin/ntpd "-d" "-S"
</pre>
</p>
<p>
To run another program after the call of <em>execl-cmdline</em> program:
<pre>
foreground { execl-cmdline { /usr/bin/ntpd -d "" -S } }
</pre>
</p>
</body>
</html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="en" />
<title>The 66 Suite: execl-envfile</title>
<meta name="Description" content="Detailed documentation for the execl-envfile command which is part of the 66 software suite" />
<meta name="Keywords" content="66 command execl-envfile service supervision execute script execline environment importas" />
<!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> -->
</head>
<body>
<p>
<a href="index.html">66</a><br />
<a href="//obarun.org/">www.obarun.org</a>
</p>
<h1>execl-envfile</h1>
<p>
A mix of <a href="https://skarnet.org/software/s6/s6-envdir.html"><tt>s6-envdir</tt></a> and <a href="https://skarnet.org/software/execline/importas.html"><tt>importas</tt></a>. Reads files containing variable assignments in the given file/directory, adds the variables to the environment and then executes a program.
</p>
<h2>Interface</h2>
<pre>
execl-envfile [ -h ] [ -f <em>file</em> ] [ -l ] <em>src</em> <em>prog</em>
</pre>
<p>
This tool expects to find a regular file or a directory in <em>src</em> containing one or multiple <tt>key=value</tt> pair(s). It will parse that file, import the <tt>key=value</tt> and then exec the given <em>prog</em> with the modified environment. In case of directory for each file found it apply the same process.
</p>
<ul>
<li>
It opens and reads a file.
</li>
<li>
It parses that file.
</li>
<li>
It imports the found <tt>key=value</tt> pair(s).
</li>
<li>
It substitutes each corresponding <tt>key</tt> with <tt>value</tt> from that file.
</li>
<li>
It unexports the variable(s) if requested.
</li>
<li>
It execs <em>prog</em> with the modified environment.
</li>
</ul>
<h2>Options</h2>
<ul>
<li>
<tt><b>-h</b></tt> : print this help.
</li>
<li>
<tt><b>-f <em>file</em></b></tt> : only parse <em>file</em> found in <em>src</em>. <b>deprecated option</b>
</li>
<li>
<tt><b>-l</b></tt> : loose; do nothing and execute <em>prog</em> directly if <em>src</em> does not contain any regular file(s) or <em>src</em> does not exist.
</li>
</ul>
<h2>File syntax</h2>
<p>
<em>src</em> is a text file or a directory containing lines of pairs with the syntax being:<br><tt>key = value</tt><br>Whitespace is permitted before and after <em>key</em>, and before or after <em>value</em>. Quoting is also possible.
</p>
<p>
Empty lines or lines containing only whitespace are ignored. Lines beginning with <tt>#</tt> (also after whitespace) are ignored and typically used for comments. Comments are <strong>not</strong> possible at the end of lines: '<tt>key = value # comment</tt>' is not a valid comment.
</p>
<p>
Empty <em>values</em> are <strong>not</strong> permitted.
</p>
<p>
If <tt>val</tt> begin by a <tt>'!'</tt> character: <tt>key=!value</tt> the <tt>key</tt> will be removed from the environment after the substitution.
</p>
<h2>Example of use</h2>
<pre>
#!/usr/bin/execlineb -P
fdmove -c 2 1
execl-envfile /etc/66/conf/ntpd
foreground { mkdir -p -m 0755 ${RUNDIR} }
execl-cmdline -s { ntpd ${CMD_ARGS} }
</pre>
<p>The equivalent with s6-envdir and importas would be:</p>
<pre>
#!/usr/bin/execlineb -P
fdmove -c 2 1
s6-envdir %%service_admconf%%
importas -u RUNDIR RUNDIR
importas -u CMD_ARGS CMD_ARGS
foreground { mkdir -p -m 0755 ${RUNDIR} }
execl-cmdline -s { ntpd ${CMD_ARGS} }
</pre>
<p>
where <tt>%%service_admconf%%</tt> contains two named files <tt>RUNDIR</tt> and <tt>CMD_ARGS</tt> written with <tt>/run/openntpd</tt> and <tt>-d -s</tt> respectively.
</p>
<h2>Limits</h2>
<p>
<em>src</em> can not exceed more than 100 files. Each file can not contain more than 4095 bytes or more than 50 <em>key=value</em> pairs.
</p>
</body>
</html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="en" />
<title>The 66 Suite: execl-subuidgid</title>
<meta name="Description" content="Detailed documentation for the execl-cmdline command which is part of the 66 software suite" />
<meta name="Keywords" content="66 command execl-subuidgid service supervision execute script execline uid gid substitute" />
<!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> -->
</head>
<body>
<p>
<a href="index.html">66</a><br />
<a href="//obarun.org/">www.obarun.org</a>
</p>
<h1>execl-subuidgid</h1>
<p>
Substitutes a literal GID UID with the UID GID of the current owner of the process.
</p>
<h2>Interface</h2>
<pre>
execl-subuidgid [ -o owner ] <em>prog</em>
</pre>
<ul>
<li>
Substitutes the variable UID GID on <em>prog</em>.
</li>
</ul>
<h2>Options</h2>
<ul>
<li>
<tt><b>-o <em>owner</em></b></tt> : set UID GID of <em>owner</em> instead of the current one.
</li>
</ul>
<h2>Usage examples</h2>
<pre>
execl-subuidgid
if { mkdir -p /run/user }
chown -R $UID:$GID /run/user
</pre>
<pre>
execl-subuidgid -o root
if { mkdir /run }
chmow -R $UID:$GID /run/user
</pre>
</body>
</html>
......@@ -237,12 +237,21 @@ MYVALUE</pre>
<li><h4>@name</h4></li>
<h5>Corresponds to the <em>name of the service directory</em> of s6 and s6-rc programs.</h5>
<p>Name of the service.</p>
<p><tt>mandatory</tt> : yes (!)</p>
<p><tt>mandatory</tt> : no</p>
<p><tt>syntax</tt> : inline</p>
<p><tt>valid values</tt> :</p>
<ul>
<li>Any name can be set as a <em>value</em>. A good pratice is to use the
same name of the frontend service file.</li>
<li>
This field has <strong>no effect</strong> except for
<tt><a href="#instance">instantiated</a></tt> services. In such case
the name <strong>must</strong> contain the complete name of the
frontend service file.</p>
<p>For example, the following is valid:</p>
<pre>@name = tty@mine-@I</pre>
<p>where:</p>
<pre>@name = mine-@I</pre>
<p>is not for a frontend service file named tty@.</p>
</li>
</ul>
<br><hr style="border: 1px dashed #000000">
......@@ -304,29 +313,7 @@ MYVALUE</pre>
to the dependencies of fooA.
</li>
<!-- Taking an another example :
FooA depens of FooB which depends of FooC, your service file can just declare FooB and
the parser will automatically add FooB because in your service file of FooB you declare
FooC as dependencies, so
FooA service file is : @depends=( FooB )
FooB service file is : @depends=( FooC )
Now we have FooA service BooA service and CooA service, FooA depends on BooA which
depends of CooA.
FooA service : @depends = ( BooA ) ;
BooA service : @depends = ( BooB BooC BooD CooA ) ;
CooA service : @depends = ( CooB CooC) ;
the complete chained dependency should be :
FooA service : @depends = ( BooA BooB BooC BooD CooA CooB CooC ) ;
BooA service : @depends = ( BooB BooC BooD CooA CooB CooC )
CooA service : @depends = ( CooB CooC) ;
So you're right, the sentence is not clear.
-->
</ul>
</ul>
<br><hr style="border: 1px dashed #000000">
......@@ -837,15 +824,13 @@ for it in your <tt>@execute</tt> field.</p>
<li>the name of the file needs to be appended with an '@' (commercial at) character.</li>
<li>every value replaced in an instance file needs to be written with '@I'.</li>
</ul>
<!-- Apart from the example I think a short explanation of instances would be very helpful. Could be a use case, or just a general situation. -->
<p>Example :</p>
<p>Example :</p>
<pre> File name : tty@
Contents :
[main]
@type = classic
@name = @I
@description = "Launch @I"
@user = ( root )
......@@ -856,7 +841,6 @@ for it in your <tt>@execute</tt> field.</p>
<p>By using <tt><a href="66-enable.html">66-enable tty@tty1</a></tt>, the resulting file will then be: </p>
<pre> [main]
@type = classic
@name = tty1
@description = "Launch tty1"
@user = ( root )
......
......@@ -81,7 +81,6 @@
<li><a href="66-hpr.html"><tt>66-hpr</tt></a></li>
<li><a href="66-shutdownd.html"><tt>66-shutdownd</tt></a></li>
<li><a href="66-parser.html"><tt>66-parser</tt></a></li>
<li><a href="66-umountall.html"><tt>66-umountall</tt></a></li>
</ul>
<h3> User tools </h3>
......@@ -102,15 +101,8 @@
<h3> Extra tools </h3>
<ul>
<li><a href="execl-cmdline.html"><tt>execl-cmdline</tt></a></li>
<li><a href="execl-envfile.html"><tt>execl-envfile</tt></a></li>
<li><a href="execl-subuidgid.html"><tt>execl-subuidgid</tt></a></li>
<li><a href="66-envfile.html"><tt>66-envfile</tt></a> <strong>deprecated</strong></li>
<li><a href="66-getenv.html"><tt>66-getenv</tt></a></li>
<li><a href="66-gnwenv.html"><tt>66-gnwenv</tt></a></li>
<li><a href="66-writenv.html"><tt>66-writenv</tt></a></li>
<li><a href="66-echo.html"><tt>66-echo</tt></a></li>
<li><a href="66-which.html"><tt>66-which</tt></a></li>
<li><a href="66-umountall.html"><tt>66-umountall</tt></a></li>
</ul>
<h2> Why is 66 necessary? </h2>
......
66-envfile(1)
# NAME
66-envfile - Read files and add their content to the environment
# DESCRIPTION
*66-envfile* is now deprecated in favor of *execl-envfile*(1).
# SEE ALSO
*execl-envfile*(1)
......@@ -145,11 +145,22 @@ Valid _key_ names:
*@name*++
Name of the service.++
_mandatory_: *yes*++
_mandatory_: *no*++
_syntax_: *inline*++
_valid values_:++
Any name can be set as a _value_. A good pratice is to use the same++
name of the frontend service file.
This field has *no effect* except for instantiated services.
In such case the name *must* contain the complete name of the
frontend service file.
For example, the following is valid:
@name = tty@mine-@I
where:
@name = mine-@I
is not for a frontend service file named tty@.
Corresponds to the _name_ of the service directory of s6 and s6-rc
programs.
......@@ -666,7 +677,6 @@ Contents:
```
[main]
@type = classic
@name = @I
@description = "Launch @I"
@user = ( root )
......@@ -679,7 +689,6 @@ Contents:
```
[main]
@type = classic
@name = tty1
@description = "Launch tty1"
@user = ( root )
......
66-getenv(1)
# NAME
66-getenv - Get and display the environment variables of a process name
# SYNOPSIS
66-getenv [ *-h* ] [ *-x* ] [ *-d* _delim_ ] _process_
# DESCRIPTION
66-getenv find the corresponding pid of the _process_ name applying a regex
search.
It open and read */proc/<pid>/environ* file and displays its contain.
# OPTIONS
*-h*
Prints this help.
*-x*
Match exactly with the process name. It can be a complete command line, in
such case its must be double-quoted.
*-d* _delim_
Specify output delimiter. The default is *\n* character.
# EXIT STATUS
*0* Success.++
*111* Failure.
# EXAMPLE
```
66-getenv -x jwm
66-getenv "ck-launch-session jwm"
```
# NOTES
The file */proc/<pid>/environ* contains the initial environment that was set
when the currently executing program was started via *execve*(2). If, after an
*execve*(2), the process modifies its environment (e.g., by calling functions
such as *putenv*(3) or modifying the *environ*(7) variable directly), this file
will *not* reflect those changes&mdash;see *proc*(5) for futher informations.
66-gnwenv(1)
# NAME
66-gnwenv - Get and write the environment variables of a process
# SYNOPSIS
66-gnwenv [ *-h* ] [ *-x* ] [ *-m* _mode_ ] _process_ _dir_ _file_
# DESCRIPTION
66-gnwenv executes into++
*66-getenv -x process 66-writenv -m mode dir file*++
It does nothing else: it is just a convenience program.
*66-getenv*(1) read the environment variable of the _process_, and
*66-writenv*(1) will write these variables into _dir/file_ location.
# OPTIONS
*-h*
Prints this help.
*-x*
Match exactly with the process name. It can be a complete command line, in
such case its must be double-quoted.
*-m* _mode_
Create _dir_ with mode _mode_ if it doesn't exist yet. Default is *0755*.
# EXIT STATUS
*0* Success.++
*111* Failure.
......@@ -6,7 +6,7 @@
# SYNOPSIS
66-parser [ *-h* ] [ *-v* _verbosity_ ] [ *-f* ] _service destination_
66-parser [ *-h* ] [ *-v* _verbosity_ ] [ *-f* ] [ *-c* | *-C* ] _service destination_
# DESCRIPTION
......
66-which(1)
# NAME
66-which - Check if a command exists in PATH or path exists and is executable
# SYNOPSIS
66-which [ *-h* ] [ *-q* | *-a* ] _command(s)_
# DESCRIPTION
66-which is a portable which command that checks if a command exists
and is executable in PATH or at specified path. It behaves slightly
different then the GNU which command.
- This tool expect to find valid command name or path, it will check
if they exists and are executable by the current user.
- It parse PATH for valid entries, applying a substitution of each
- entry with its realpath and emilinating duplicates.
- It parses that command given checking if it is a path or a name.
- It prints each command found with the first PATH entry, otherwise
it print an error. By passing the *-a* option, it
searches and print command with all the PATH entries, even if it
been already found.
# OPTIONS
*-h*
Print this help.
*-a*
Print all. Search and print the command using all the PATH entries, even
after the command has already been found.
*-q*
Quiet. Do not print anything on stdout.
# EXIT CODE
*0* Success; all the commands have been found.++
*110* Bad usage.++
*111* System call failed or at least one command hasn't been found.
# EXAMPLES
Search for a command by using its name:
$ 66-which 66-echo
/usr/bin/66-echo
Check for a command by using its path:
$ 66-which /usr/bin/66-echo
/usr/bin/66-echo
Usage of *66-which* in a script:
#!/usr/bin/execlineb -P
if { 66-which -q vgchange }
vgchange -ay
# NOTES
*66-which* need at least one valid entry in PATH that exists on the
system. *66-which* is often used in critical scripts, like the ones booting
the system, so it's important to check if PATH contains valid entries for the
current system.
*66-which* correctly handle the tilde *~* character for paths.
Beware that same shell, like bash, replaces this character with the
current user home path. To pass the correct string to *66-which*,
containing the tilde character, use quoting like this: *66-which*
'~/.bin/gvr'.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment