LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-21-2022, 02:39 PM   #1
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,055

Rep: Reputation: Disabled
Anyone tried finit aka fast init on Slackware?


links:
https://troglobit.com/projects/finit/
https://github.com/troglobit/finit

Primary target is embedded systems, however there are tutorials for Void, Alpine Linux, Debian GNU/Linux and derivatives (official package for SID).

Caveat: I am not interested by the usual boring discussions/flame wars wrt various init systems. Please answer only if/when you have actually tried finit on Slackware or another OS, possibly in an initramfs or embedded system.
 
Old 06-21-2022, 08:01 PM   #2
h2-1
Member
 
Registered: Mar 2018
Distribution: Debian Testing
Posts: 556

Rep: Reputation: 315Reputation: 315Reputation: 315Reputation: 315
I'm interested in this, inxi tries to support all init systems, but finit is new to me.

Any idea how it can be detected, does it run on /proc/1/comm ?

I'd like to get that supported as soon as possible, I'd never heard of this one.

Also, does it have a -v/--version type option

Does it use initctl, or is that just optional? Or does it use its own init tool, like systemctl, rcctl, service, etc?

I'll add tentative support for that until it's confirmed more with data. Maybe I'll try a void test.

I also don't have any data on initctl, in terms of what its output looks like for: initctl status [service]

Last edited by h2-1; 06-21-2022 at 08:17 PM.
 
Old 06-23-2022, 02:15 AM   #3
walecha
Member
 
Registered: Jan 2010
Location: Malang, +62
Distribution: slackware
Posts: 174

Rep: Reputation: 42
Quote:
Originally Posted by h2-1
Any idea how it can be detected, does it run on /proc/1/comm ?
yes, it came with it's own init (/sbin/finit and /sbin/initctl).

Quote:
Also, does it have a -v/--version type option
what do you mean by version option?

Quote:
I also don't have any data on initctl, in terms of what its output looks like for: initctl status [service]
here you go
Code:
root@app4099:~# initctl status php-fpm
     Status : running
   Identity : php-fpm
Description : PHP-FPM
     Origin : /etc/finit.d/php-fpm.conf
Environment : 
Condition(s): <+net/lo/up>
    Command : php-fpm -F
   PID file : /run/php-fpm.pid
        PID : 605
       User : root
      Group : root
     Uptime : 2 hour 56 min 20 sec
   Restarts : 0 (0/10)
  Runlevels : [--2345----]
     Memory : 45.8M
     CGroup : /system/php-fpm cpu 0-5 [100, max] mem [0, max]
              └─ 605 php-fpm 

Jun 23 09:48:54 app4099 finit[1]: Service php-fpm[0] died, restarting (1/10)
Jun 23 09:53:10 app4099 finit[1]: Service php-fpm[0] died, restarting (2/10)
Jun 23 10:05:28 app4099 finit[1]: Service php-fpm[0] died, restarting (1/10)
Jun 23 11:14:35 app4099 finit[1]: Service php-fpm[0] died, restarting (1/10)
This is on vm using slackware64-15.0
 
1 members found this post helpful.
Old 06-23-2022, 12:16 PM   #4
h2-1
Member
 
Registered: Mar 2018
Distribution: Debian Testing
Posts: 556

Rep: Reputation: 315Reputation: 315Reputation: 315Reputation: 315
Great, clean syntax. What is the result if you give it a non-existent service, like so:

Code:
initctl status foo-bar
and also for a service that is present but not running, ie, stopped? inxi cares about three init states, running, stopped, and failed/not found.

-v/--version is standard optional to get version info, in this case from finit, but reading its man page it doesn't list support any options at all, so I assume it doesn't have it. It's always nice to be able to get init version, can even get it sometimes from sysvinit using strings on some systems, though that's a special case.

I can't believe I missed initctl since apparently that was also used by Upstart, but I only really ran upstart in vm ubuntu, didn't spend much time on it, figuring, correctly, that it would go away as many Ubuntu projects tend to do.. Mir... Unity... etc...
 
Old 06-25-2022, 11:07 PM   #5
walecha
Member
 
Registered: Jan 2010
Location: Malang, +62
Distribution: slackware
Posts: 174

Rep: Reputation: 42
finit version can be obtained using -v option
Code:
 $ /sbin/finit -v
Finit 4.3
Bug report address: https://github.com/troglobit/finit/issues
Project homepage: https://troglobit.com/projects/finit/
As far as my experiment shown, finit can track service/task state: running, stopped, crashed/restart/failed (missing the wanted output or dependency of the service), ready (waiting for condition to be ready to start), and missing service configuration (renamed/removed). Any services is a symlink to the /etc/finit.d/available/*.conf that will be retouched using `initctl reload` to update the list of enabled services and then reloading/restarting any updated running services.
 
Old 06-25-2022, 11:44 PM   #6
h2-1
Member
 
Registered: Mar 2018
Distribution: Debian Testing
Posts: 556

Rep: Reputation: 315Reputation: 315Reputation: 315Reputation: 315
The finit man page didn't list any option support, thanks for checking empirically. This should be working with pinxi now, always nice to add support for something new for next inxi, I try to do that in general, but it's hard to predict what will pop up.

For the initctl stuff I have to see the output for the 2 commands, non-existent/failed, and stopped/paused, depends on their syntax, inxi has to know what to look for, it maps all string values to consistent set of 3 values which are the same for all init systems, which are I believe: running, stopped, failed. I don't try to get more granular than that because that part is only used in I think Bluetooth, and for display manager if > 1 I think, tries to see which is running/stopped. Maybe 4 values, I forget, since systemd has stopped and disabled, which are different things. I think some other init tools have stopped/disabled, but most usually have disable remove the command if I remember right.

Bit by bit though, nice to add one, looks like Void is using it, maybe Alpine and Artix may, so it will exist out there in Linux-land.

Last edited by h2-1; 06-25-2022 at 11:47 PM.
 
3 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Has anyone heard of ROBOLINUX? I tried going there but no replies from anyone rusty377 Linux - Newbie 14 07-21-2018 08:54 AM
Linux User Info script aka how to get information about users fast _Avyd Linux - General 4 02-28-2014 10:32 AM
What is the exact diff between init 1,init S and init s challavijay Linux - Newbie 1 08-05-2010 06:51 AM
Finit-Arch vs Qinit Alexvader Arch 4 06-02-2010 09:36 AM
Removing the Enlightenment Sound Daemon (aka "esd" aka "esound") jgombos Debian 4 03-30-2010 02:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration