:: Re: [DNG] Command to permanently pr…
Top Page
Delete this message
Reply to this message
Author: Bruce Ferrell
Date:  
To: dng
Subject: Re: [DNG] Command to permanently prevent sysvinit from starting daemon
On 10/22/18 6:14 AM, KatolaZ wrote:
> On Mon, Oct 22, 2018 at 02:54:40PM +0200, Arnt Karlsen wrote:
>
> [cut]
>
>>> sysvinit currently supports runlevels 0-6, with 0 and 6 have special,
>>> fixed meaning. There is *currently* no way of naming a runlevel using
>>> more than one character, due to the way the "change runlevel"
>>> information is communicated to the init process.
>>>
>>> In Debian/Devuan, runlevel 1 has traditionally been assigned to
>>> single-user mode, and runlevel 2 to multi-user mode. But there is no
>>> written rule about that (meaning that a sysadmin can move and
>>> configure runlevels around as she wishes).
>> ..I thank you both for your excellent heads-up on the *current*
>> status of sysvinit, a first step would be try utf-8 characters
>> like 'telinit � ' etc ... :o)
>> Aaand, I'm still not saying this is an awesomely good idea. ;o)
>>
> Sorry, I should have been more precise on that: sysvinit currently
> supports only runlevel names consisting of *one byte*. ;)
>
> HND
>
> KatolaZ


Classicly, not even one byte, but one digit,0 to 9 or symbolics for zero to six - sSQqabcUu

7, 8 and 9 are almost never used (and almost totally undocumented) but are available for custom stuff.

Different distros that use sysV may use the run levels differently.  Usually 1 is single user, 2 is no NFS multiuser, 3 is full multiuser, 5 is graphic multiuser, 6 handles reboot
and 0 handles halt.

If I understand the original question "how to I get sysV init to not start a process present in the init system", There is a command, chkconfig:

chkconfig <init script name> on or off

    changes the state of the init script to either on or off. When runlevel changes, the script, if on executes.  Off is then obvious.

chkconfig --list

    without the name of an init script, lists the configured run level(s) for all init scripts that sysV is aware of and all the runlevels for them, on or off.

    If an init script name is given, the state of that script is shown

chkconfig --add <init script name>

chkconfig --del <init script name>

    adds or removes an init script from sysV "awareness"

Upstart maintains an imperfect but highly usable level of compatibility.  chkconfig still works but /etc/inittab isn't used.


For REAL fun go find an old BSD style init.

One monolithic init script for all the system processes except those directly in /etc/inittab