You are not logged in.

#1 2014-03-01 12:32:20

axs
Member
Registered: 2009-01-23
Posts: 71
Website

sninit, a small static sysv-style init

So yeah, one more init implementation. Because no way my systems will be running systemd.

https://github.com/arsv/sninit (tarball)

Key features:

* Runlevels for process management
* Starting and stopping individual processes manually: "telinit stop httpd" and so on
* Sleep/suspend/hibernate as runlevels
* Support for initdirs (one file per process) in addition to sysvinit inittab (one line per process)
* Small size, static linkage, no external dependencies
* Simplified memory management; no malloc, memory allocation only while reconfiguring

I've been re-thinking the design of common startup scripts, pm-utils, laptop-utils, and basically those ideas ended up as a base for sninit. And I needed replacement for sysvinit in my router, because having to edit inittab to stop a process was really annoying. And, of course, systemd.

This is how its inittab looks like: inittab.example

Telinit:

telinit q
telinit stop httpd
telinit start httpd
telinit poweroff
telinit sleep

Unlike other minimalistic init implementations (well, minit and derivatives), sninit is not really minimalistic as far as features go.
It is more like an extended sysvinit derivative, despite being significantly smaller than sysvinit.

As usual, it's a work-in-progress, so future changes are possible.
At present it should be usable, so anyone interested is welcome to try it.

Not related to this sinit. Oh my. Talk about name collision.

Last edited by axs (2015-11-13 20:55:41)

Offline

#2 2014-03-01 13:22:30

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: sninit, a small static sysv-style init

Wow, it's raining inits big_smile

But as you realized already, the name collision is quite bad.

Also, are you borrowing sysvinit's telinit or just using the name?

Offline

#3 2014-03-01 14:04:51

rebootl
Member
Registered: 2012-01-10
Posts: 431
Website

Re: sninit, a small static sysv-style init

Wow, it's raining inits big_smile

But as you realized already, the name collision is quite bad.

You name it smile
As for the name maybe svinit since it's sysv-style and it seems to have some supervise capabilities could be read as this as well...

Last edited by rebootl (2014-03-01 18:28:32)


Personal website: reboot.li
GitHub: github.com/rebootl

Offline

#4 2014-03-01 14:38:01

progandy
Member
Registered: 2012-05-17
Posts: 5,191

Re: sninit, a small static sysv-style init

rebootl wrote:

Wow, it's raining inits big_smile

But as you realized already, the name collision is quite bad.

You name it smile
As for the name maybe svinit since it's sysv-style and it seems to have some supervise capabilities could be read as this as well...

There is already an svinit. Maybe call it rinit because sleep, suspend and hibernate are runlevels?


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#5 2014-03-01 15:29:12

axs
Member
Registered: 2009-01-23
Posts: 71
Website

Re: sninit, a small static sysv-style init

rinit = rhinitis, and there's already a well-known project called runit.
Actually, there's already at least one init for any letter of the alphabet I think. More that one in some cases (dinit).
A different name would be nice though. Got to think on that.

Also, are you borrowing sysvinit's telinit or just using the name?

Same name, same semantics to some degree (telinit 3, telinit q and so on).
Different code, different control file name, different communication protocol.

Offline

#6 2014-03-01 17:44:30

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: sninit, a small static sysv-style init

How about "axsinit" wink

Offline

#7 2014-03-01 17:48:16

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: sninit, a small static sysv-style init

'tasinit' - this ain't sinit.

Offline

#8 2014-03-01 18:00:47

axs
Member
Registered: 2009-01-23
Posts: 71
Website

Re: sninit, a small static sysv-style init

Eh, just renamed to sdinit. Static, dietlibc. Or services, dietlibc. Something like that. Also close to development name.
Clashes with some Windows tool, but it's not like we care about Windows do we?

rebootl wrote:

As for the name maybe svinit since it's sysv-style and it seems to have some supervise capabilities could be read as this as well...

Makes me wonder btw what it takes nowadays to have full supervising capabilities.

Offline

#9 2014-03-01 18:27:03

rebootl
Member
Registered: 2012-01-10
Posts: 431
Website

Re: sninit, a small static sysv-style init

Makes me wonder btw what it takes nowadays to have full supervising capabilities.

Ah, sorry I didn't meant to imply something. I just wrote some cause I didn't look into what it does exactly. Me => stupid.


Personal website: reboot.li
GitHub: github.com/rebootl

Offline

#10 2014-03-01 18:48:54

axs
Member
Registered: 2009-01-23
Posts: 71
Website

Re: sninit, a small static sysv-style init

Ok, that's good then. I'm trying to gather data for init comparison chart, so I was wondering if I do supervising/nonsupervising classification correctly.

https://bbs.archlinux.org/viewtopic.php … 5#p1387375
http://ranger.nongnu.org/minirc.html

Offline

#11 2014-03-02 03:51:38

Jristz
Member
From: America/Santiago
Registered: 2011-06-11
Posts: 1,022

Re: sninit, a small static sysv-style init

poninit?
Prominent
Overthinked
New
Init

ok no, but look good, if only I have another machine and yime for this


Well, I suppose that this is somekind of signature, no?

Offline

#12 2014-03-02 09:06:17

sekret
Member
Registered: 2013-07-22
Posts: 284

Re: sninit, a small static sysv-style init

What about calling it something without "init" in it? Like ... iwan (init without a name)

Offline

#13 2014-03-02 19:37:48

rebootl
Member
Registered: 2012-01-10
Posts: 431
Website

Re: sninit, a small static sysv-style init

axs:

Ok, that's good then. I'm trying to gather data for init comparison chart, so I was wondering if I do supervising/nonsupervising classification correctly.

Ah yes, the table is nice, funny and useful. As for supervision the point I find there would be "Respawning on service crash without losing connectivity". I'd say that is full support, whereas partial could be "Respawning on service crash". (Maybe more points apply.)

Regards, I like axsinit.

Last edited by rebootl (2014-03-02 19:38:08)


Personal website: reboot.li
GitHub: github.com/rebootl

Offline

#14 2014-03-04 03:55:38

Iao
Member
Registered: 2012-11-09
Posts: 20

Re: sninit, a small static sysv-style init

ignit, like the word "ignite" would be cool.

Offline

#15 2014-03-04 05:02:10

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: sninit, a small static sysv-style init

There's already an ignite available: https://github.com/chneukirchen/ignite

Also, the author has already reverted to sinit, so thanks for all the naming suggestions.

Offline

#16 2015-11-13 21:15:19

axs
Member
Registered: 2009-01-23
Posts: 71
Website

Re: sninit, a small static sysv-style init

Since the project was announced here, I'm bumping the thread with some updates.

The init is definitely usable now.
There are Buildroot defconfigs to build complete bootable systems to prove that, and it has been run on some real devices.
A lot of code has been reworked and configuration formats changed, so I updated the first post.
The executables are even smaller now, and it's got its own mini-libc.

The project has been called "sninit" for a while already, and the name not likely to change anymore.

Instead of the comparison table, there is now doc/others.txt with an overview of the available init systems and their relation to each other.

Offline

Board footer

Powered by FluxBB