FAQ for ninit

Q: Why another init?
Hm-mmm! I offer security guarantee. On my boxes ninit uses minimal resources - only 8K RAM. I was looking for the name and my friend Pencho Marinov suggested me: "Ninit is a good name since it's small. The people will spell it nano-init!"
Q: What's the difference between minit and ninit?
ninit is a fork from minit. On user level ninit support all features of minit. There is one difference. Ninit doesn't support unnamed pipes between a service and a log-service. It does logging with named pipes. I decided to remove unnamed pipes. This saves code.

Ninit create the links and named pipes for log services alone. There is one restriction only. The service dir must be writable. One have to start such services after mount, or create links manually before starting the service. Example

  mkfifo -m 600 log/in
  ln -s log/in out
Q: Your pidfilehack doesn't work with minit.
In recent versions I decided to rename pidfilehack to ninit-pidfile. With ninit you can prepare a service and if it forks and writes the PID in some file then type in the service directory:
	echo /path/to/deamon.pidfile > pidfile
Q: Why do you split ninit in separate programs -- ninit and helpers?
I have to write a separate page for this question.
Q: Is there web interface for creating services?
Not yet. Who do this?
Q: How about security? Is ninit reliable?
I wrote all following Daniel Bernstein and Felix von Leitner. I'm not so great like them, bath I try to write similar code to their. Since I believe that the programs are secure ninit comes with a guarantee.
Q: Why documentation is in a separate file?
So I can change and keep it up to date easy. You can also install HTML-docs on your box. They are public.
Q: Your documentation is bad!
I know. May be you will help to make it better. See also this.
Q: Should I start the service sysvinit at boot time?
No! Five minutes after boot time ninit try to start this service. If such service exists it open the fifo /dev/initctl. If there is any activity on the fifo it invokes the emulator ninit-sysvinit. If you don't plan to start the commands halt, reboot, shutdown, telinit, then you can do:
	cd /etc/ninit
	mv sysvinit sysvinit_
	nsvc -o update
Some scripts in /etc/init.d/ uses the above sysvinit commands.
Q: Halt and reboot doesn't work clean with ninit.
How to stop the system running ninit see here. If you have a servive sysvinit then all must be fine. See also ninit-sysvinit.

If you have again problems with nsvc -o {halt|reboot|_l0|_l6} the problem is probably init.d/halt script. For example on FEDORA last script ends with:

  [ -n "$kexec_command" ] && $kexec_command -e >& /dev/null
  
  HALTARGS="-i -d"
  [ -f /poweroff -o ! -f /halt ] && HALTARGS="$HALTARGS -p"
  
  exec $command $HALTARGS
You have to include the following lines before the text above.
  if [ -n "$NINIT_RUNLEVEL" ] ; then
     # use ninit-reboot instead of halt|reboot|poweroff
     NINIT_HALT=HALT
     [ -f /poweroff -o ! -f /halt ] && NINIT_HALT=POWER_OFF
     [ "$command" = "/sbin/reboot" ] && NINIT_HALT=RESTART
     exec /sbin/ninit-reboot $NINIT_HALT
  fi
See also the manpages halt(8), poweroff(8), reboot(8), ninit-reboot and ninit-sysvinit. The commands halt, reboot, poweroff belongs to the sysvinit package.
Q: Which are the new files in ninit which are missing in minit?
They are:   environ, wait, maixwait, softlimit, sleep, end, uid, setup, rsetup, sys-rsetup, pidfile, alarm, pause, pause-wait, cron. Ninit start services using the helper programs from /etc/ninit/sys/ dierctory. It aslo have sysvinit emulator.
Q: Why my ninit uses more than 36k RAM?
You have build ninit with glibc. Read here how to make small static binaries.
Q: Why serdo doesn't start script in current dir?
See my comments in serdo.c source after main. If you still want uncomment one line there to support this feature. It's not a security whole, but I personally find it too dangerous.
Q: How to see which version I use?
In the recent versions it's coded in the file /etc/init/.sync
cat /etc/ninit/.sync
Q: How can I ask a new question?
Read first this file and documentation carefully. Look also the package README.
There is a mailing list for ninit. To subscribe, send an empty message to
ninit-subscribe@riemann.fmi.uni-sofia.bg
. Some delay is posstible due to greylisting. Send me private emails using qform.

Last updated: 15 Jan 2010





















































Gratuitious blank lines added so that FAQ.html#link works.