aboutsummaryrefslogtreecommitdiff
path: root/riemann.fmi.uni-sofia.bg/ninit/ninit.html
diff options
context:
space:
mode:
authorKlaatu Sverige <[email protected]>2015-08-05 21:31:21 +0000
committerKlaatu Sverige <[email protected]>2015-08-05 21:31:21 +0000
commit86f0721bd904d8163c5f8f2472b78169146cc67d (patch)
treecf9e61bd495c73ece45b96242e6f575af228d01d /riemann.fmi.uni-sofia.bg/ninit/ninit.html
parent75a501d32dff3c1c1ee9a2a3dc6d5b704cc7c6d1 (diff)
added website data, because it had heaps of good tutorials and info
Diffstat (limited to 'riemann.fmi.uni-sofia.bg/ninit/ninit.html')
-rw-r--r--riemann.fmi.uni-sofia.bg/ninit/ninit.html395
1 files changed, 395 insertions, 0 deletions
diff --git a/riemann.fmi.uni-sofia.bg/ninit/ninit.html b/riemann.fmi.uni-sofia.bg/ninit/ninit.html
new file mode 100644
index 0000000..708382e
--- /dev/null
+++ b/riemann.fmi.uni-sofia.bg/ninit/ninit.html
@@ -0,0 +1,395 @@
+<html>
+<link rel="stylesheet" type="text/css" href="style.css">
+<title>ninit - small Linux/UNIX init</title>
+<body>
+
+<div class="top">
+<ul class="nav">
+ <li><a href="all.html">All files</a>
+</ul>
+
+<h1>ninit - a small replacement of init</h1>
+<div class="endtop"></div>
+</div>
+
+Release: &nbsp;
+<!--
+<a href=ninit-0.12.1.tar.bz2>ninit-0.12.1.tar.bz2</a> (stable) &nbsp;
+-->
+<a href=ninit-0.14.tar.bz2>ninit-0.14.tar.bz2</a>
+<br> Author's private <i>/etc/ninit/</i> &nbsp;
+<a href=ninit-data.tar.gz>ninit-data.tar.gz</a> ::
+<a href=http://gitorious.org/arch-ninit/ninit-scripts>archlinux</a>
+<br>
+<p>
+
+<table align=top>
+<td>
+<ul>
+<li><a name='toc0' href='#HowItWorks'>How it works</a></li>
+<li><a name='toc1' href='#Install'>Install</a></li>
+<li><a name='toc2' href='#PostInstall'>Post install</a></li>
+<li><a name='toc4' href=man/>Manpages</a></li>
+</ul>
+</td>
+
+<td>
+<ul>
+<li><a name='toc5' href=all.html>Download</a></li>
+<li><a name='toc3' href='#Updating'>Updating <tt>ninit</tt></a></li>
+<li><a name='toc6' href=FAQ.html>FAQ</a></li>
+<li><a name='toc10' href=ninit-html.tar.bz2>HTML</a></li>
+</ul>
+</td>
+
+<td>
+<ul><li><a name='toc11' href='#HaltReboot'>Halt &amp; Reboot</a></li>
+<li><a name='toc8' href=subdirs.html>Subdirs</a> -
+<font color=magenta>read me!</font></li>
+<li><a name='toc888' href=files.html>Files</a> -
+<font color=magenta>read me!</font></li>
+
+<li><a name='toc9' href="subdirs.html#Services">Creating</a> services</li>
+</ul>
+</td>
+<!--
+11
+-->
+</table>
+
+<p>
+<a href=/ninit/guarantee.html>The ninit security guarantee</a>
+<!--
+<br>
+<a href=LK/>Linux-Kongress 2009 submission</a>
+-->
+
+<h2><a name="New">What's new</a></h2>
+<ul>
+<li> 20100116 - version
+ <a href=ninit-0.14.tar.bz2>ninit-0.14.tar.bz2</a> uploaded.
+</li>
+<li> 20090110 - version
+ <a href=old/ninit-0.13.tar.bz2>ninit-0.13.tar.bz2</a> uploaded.
+</li>
+<!--
+<li> 20080103 - version
+ <a href=old/ninit-0.12.1.tar.bz2>ninit-0.12.1.tar.bz2</a> uploaded.
+</li>
+<li> 20071102 - version
+ <a href=old/>ninit-0.12.tar.bz2</a> uploaded.
+</li>
+<li> 20071025 - version
+ <a href=old/>ninit-0.11.2.tar.bz2</a> uploaded.
+ Ninit have buildin cron and uses only 8K RAM (two pages).
+</li>
+-->
+<li> 20071010 - mailing lists for ninit.</li>
+</ul>
+
+<h2><a name="About">About</a></h2>
+<b>ninit</b> is a fork from Felix von Leitner's
+<a href=http://www.fefe.de/minit/>minit</a>.
+Some other related <a href=links.html>links</a>.
+<br>
+<!--
+Like any other piece of software (and information generally),<br>
+ninit comes with NO WARRANTY.
+<p>
+-->
+<a name=List>
+There is a
+&#109;&#97;&#105;&#108;&#105;&#110;&#103;&#32;&#108;&#105;&#115;&#116;
+for ninit. To &#115;&#117;&#98;&#115;&#99;&#114;&#105;&#98;&#101;&#44;
+send an empty &#109;&#101;&#115;&#115;&#97;&#103;&#101;
+to <br>
+<font size=+1>
+<a href=
+&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#110;&#105;&#110;&#105;&#116;&#45;&#115;&#117;&#98;&#115;&#99;&#114;&#105;&#98;&#101;&#64;&#114;&#105;&#101;&#109;&#97;&#110;&#110;&#46;&#102;&#109;&#105;&#46;&#117;&#110;&#105;&#45;&#115;&#111;&#102;&#105;&#97;&#46;&#98;&#103;
+>
+&#110;&#105;&#110;&#105;&#116;&#45;&#115;&#117;&#98;&#115;&#99;&#114;&#105;&#98;&#101;&#64;&#114;&#105;&#101;&#109;&#97;&#110;&#110;&#46;&#102;&#109;&#105;&#46;&#117;&#110;&#105;&#45;&#115;&#111;&#102;&#105;&#97;&#46;&#98;&#103;
+</a>
+</font>
+</a>
+<br>
+Some delay is possible due to
+&#103;&#114;&#101;&#121;&#108;&#105;&#115;&#116;&#105;&#110;&#103;&#46;
+
+<p>
+<b>ninit</b> uses minimal resources (arch: i386; kernel: 2.4.37):
+<pre>
+ USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
+ root 1 0.0 0.0 8 8 ? S Oct08 0:03 /sbin/ninit
+
+ text data bss dec hex filename
+ 3642 20 56 3718 e86 /sbin/ninit
+</pre>
+
+<h2><a name="Install">Install</a></h2>
+You have to build and install ninit first. I prefer to do this
+with Fefe's <a href=http://www.fefe.de/dietlibc/>dietlibc</a>.
+<br>
+Download the latest stabe
+ <a href=http://riemann.fmi.uni-sofia.bg/ninit/ninit-0.14.tar.bz2>
+ ninit-0.14.tar.bz2</a> release. Then:
+
+<pre>
+ bzip2 -dc ninit-0.14.tar.bz2 | tar -xvf -
+ cd ninit-0.14
+
+Case-A: If you have dietlibc already working do:
+ $ make withdiet; make tests
+ # make install
+
+Case-B: If you do not have dietlibc do:
+ $ make dietbuild; make tests
+ # make install
+</pre>
+To compile <tt>ninit</tt> with glibc do:
+<pre>
+ $ make nodiet; make tests
+ # make install
+</pre>
+Only <tt>make install</tt> must be started as root!
+Other install instructions are <a href=install.html>here</a>.
+You can type also <tt>make strip</tt> before <tt>make install</tt>.
+The distributions
+<b><font color=magenta>should read</font></b>
+this <a href=install.html#Warning>warning</a>.
+
+<h2><a name="PostInstall">Post install</a></h2>
+
+You have to prepare service directory <tt>/etc/ninit</tt>
+and to setup
+<br>
+boot loader (grub or lilo) to start
+<tt>/sbin/ninit</tt> instead of <tt>/sbin/init</tt>
+<p>
+
+<h4>Preparing directory <tt>/etc/ninit</tt></h4>
+
+<b>Case A.</b>
+
+If you already have <tt>ninit</tt> running, then you
+already have this directory and can skip to
+<a href='#Updating'>updating</a> ninit.
+<p>
+<b>Case B.</b> If you already have
+<tt><a href="http://www.fefe.de/minit/">minit</a></tt> running do
+simply:
+<a name="SamePipes">
+<pre>
+ cd /etc && cp -p -R minit/* ninit
+</pre>
+</a>
+
+<b>Case C.</b> If your default init is <tt>/sbin/init</tt> it's also
+easy.
+<br>
+I wrote a simple converter
+<tt><a href=man/inittab.man>ninit-inittab</tt></a>.
+Try it with:
+<pre>
+ /sbin/ninit-inittab /etc/inittab /etc/ninit /tmp/ninit.sh
+ /tmp/ninit.sh
+</pre>
+Last two commands are equivalent to:
+<pre>
+ make ser_vi_ces
+</pre>
+<hr>
+
+<h4>Setup lilo/grub to boot <tt>/sbin/ninit</tt></h4>
+
+To use <tt>ninit</tt> as system init add the parameter
+<tt>init=/sbin/ninit</tt>
+<br>
+to your kernel command line.
+See some short instructions <a href=boot.html>here</a>.
+<br>
+After that you have to reboot the system.
+
+<h2><a name="Updating">Updating <tt>ninit</tt></a></h2>
+If <tt>ninit</tt> is already running your boot loader is
+already prepared to start <tt>/sbin/ninit</tt>. After
+installation all is done automatically. Simply do nothing more!
+<p>
+You can test the new executable (before <tt>make install</tt>)
+also with:
+<pre>
+ /sbin/ninit-reload -v -u /path/to/new/ninit
+ cp /path/to/new/ninit /sbin
+ cp /path/to/new/ninit-reload /sbin
+ /sbin/ninit-reload -v -u /sbin/ninit
+</pre>
+
+<h2><a name="HowItWorks">How it works</a></h2>
+
+For ninit, everything is a service, which should either be started
+once or respawned. Ninit expects its configuration in the
+<tt>/etc/ninit</tt> directory.
+You have to create
+all services in this directory
+manually or using the program
+<tt><a href=man/inittab.man>ninit-inittab</tt></a>.
+My private <a href=ninit-data.tar.gz>ninit-data.tar.gz</a>
+and <a href=ls-R.txt>ls-R</a> are also public.
+
+<p>
+Ninit searches for a file called
+<tt><a href="files.html#Depends">depends</a></tt> in the subdirectory
+<tt><a href="subdirs.html#Default">default</a></tt>.
+This file tells ninit which services should be
+started by default (in fact it tells ninit that the service
+<tt>default</tt>
+depends on other services, but <tt>default</tt> is the directory ninit
+starts to search in). Instead of the file <tt>default/depends</tt> it is
+possible to start services with
+<a href=man/scan.man>ninit-scan</a>.
+
+<!--
+Special subdirectories and files are described
+<a href="#Special">here</a>.
+-->
+
+<p>
+Ninit doesn't start services alone. It uses the helper program
+<tt>/etc/ninit/sys/<a href=man/run.html>run</a></tt>
+to start a service. On this way ninit doesn't parse
+the service instructions in the corresponding directory.
+This keeps ninit small and it's easy to change
+<tt>/etc/ninit/sys/run</tt>.
+
+<p>
+There is a companion utility
+<tt>/bin/<a href=man/nsvc.man>nsvc</a></tt>
+that can be used much in the same
+way as the
+<tt><a href=http://cr.yp.to/daemontools/svc.html>svc</a></tt>
+from daemontools.
+Communication works over two fifos,
+<tt>/etc/ninit/{in|out}</tt>.
+Those have to exist before ninit is
+started and they should be owned by root and have mode 600.
+<!--
+<br>
+If on box also exist
+<a href=http://www.fefe.de/minit/>minit</a> then ninit must
+use minit's
+<a href="#SamePipes">fifos</a>.
+-->
+
+<p>
+While <tt>sys/run</a></tt> is the main
+<tt><a href=man/ninit.man>ninit</a></tt> helper,
+there are
+also four auxiliary helpers
+<tt><a href=man/pidfile.man>ninit-pidfile</a></tt>,
+<tt><a href=man/pututmpid.man>pututmpid</a></tt>,
+<tt><a href=man/runlevel.man>ninit-runlevel</a></tt> and
+<tt><a href=man/sysvinit.man>ninit-sysvinit</a></tt>
+used to start services.
+<pr>The last three helpers
+emulate <tt>/sbin/init</tt> behavior.
+
+<!--
+<h2><a name="Programs">Programs</a></h2>
+<tt>/etc/ninit/sys/<a href=man/run.html>run</a></tt> - ninit helpler
+-->
+
+
+<h2><a name="HaltReboot">Shutdown and reboot</a></h2>
+On a box running
+<b>ninit</b> as process no 1 it is better to avoid using the SysVinit
+programs shutdown, reboot, and halt. First, check the directory
+<tt>/etc/ninit</tt>. Assuming you have the services
+<tt>{_l0|halt}</tt> and
+<tt>{_l6|reboot}</tt>, you can try
+<pre>
+ nsvc -o halt
+ nsvc -o reboot
+</pre>
+If you have service <a href="subdirs.html#Ctrlaltdel">ctrlaltdel</a> then
+<tt>CTRL-ALT-DELETE</tt> halts the hox.
+<p>
+
+
+The converter
+<tt><a href=man/inittab.man>ninit-inittab</a></tt>
+can
+usually create these services for you. If they are still missing, the
+last choice is to use the program
+<tt><a href=man/shutdown.man>ninit-shutdown</a></tt>,
+or alternatively
+the SysVinit programs <i>shutdown, reboot, halt</i>.
+Other problems with halt are described
+<a href="FAQ.html#q11">here</a>..
+
+<h2>Future</h2>
+
+<ul>
+<li>explain why I decide to fork from Felix's <tt>minit</tt>
+<li>write this page better (see also <a href=man/README>here<a>)
+<li>tutorial for
+<a href="subdirs.html#Services">creating</a> services (partially done)
+<!--
+<li>explain the entries <tt>update_links</tt>,
+<tt>ser_vi_ces</tt> and <tt>distro</tt> in Makefile
+<li>explain why I decide to make one daemon as two separate programs:
+<br>
+<tt>/sbin/<a href=man/ninit.man>ninit<a></tt>
+and <tt>/etc/ninit/<a href=man/run.html>run</a></tt>. Last program
+only start a service and exit.</li>
+-->
+<li>explain better some new features of <tt>ninit</tt> which
+are missing in <tt>minit</tt> (see also
+<a href=FAQ.html#q12>here</a>).
+<li>explain all compile options included in the file
+<tt>ninitfeatures.h</tt>
+</ul>
+
+<!--
+<h2>Translation table</h2>
+between minit and ninit programs:
+<pre>
+ /bin/msvc -> /bin/nsvc
+ /sbin/minit -> /sbin/ninit
+ /sbin/minit-update -> /sbin/ninit-reload
+ /sbin/hard-reboot -> /sbin/ninit-reboot
+ /sbin/mshutdown -> /sbin/ninit-shutdown
+</pre>
+It's possible to make a link
+<pre>
+ cd /bin && ln -s nsvc msvc
+</pre>
+and continue to use <tt>msvc</tt> in shell scripts.
+How to use <tt>pidfilehack</tt> see also
+<a href="FAQ.html#q3">here</a>.
+-->
+
+<h2>See also</h2>
+Here are the package <a href=README>README</a>
+and <a href=CHANGES>CHANGES</a>.
+Almost all for <b>minit</b> is true for <b>ninit</b> also.
+<br>
+Other related <a href=links.html>links</a>.
+
+
+<h2>Author: Nikola Vladov</h2>
+If you like <b>ninit</b>, try also my
+<a href=/ngetty/>
+ngetty</a> - single daemon for all virtual consoles.
+<br>
+Send comments and suggestions using ninit
+<a href=#List>&#109;&#97;&#105;&#108;&#105;&#110;&#103;&#45;&#108;&#105;&#115;&#116;</a> or
+<a href=&#47;&#101;&#109;&#97;&#105;&#108;&#46;&#104;&#116;&#109;&#108;>
+qform</a>.
+<br>
+<b><font color=red>WARNING</font></b>:
+ninit is tested only on i386 and x86_64 arch.
+
+<p>
+Last modified: Feb 11 2010
+<br><br><br><br><br><br><br><br>
+</body>
+</html>