:: Re: [Dng] Slackware systemd creepin…
Top Pagina
Delete this message
Reply to this message
Auteur: Dragan FOSS
Datum:  
Aan: James Powell, dng
Onderwerp: Re: [Dng] Slackware systemd creepin in maybe?
On 05/24/15 02:01 AM, James Powell wrote:
> SMF still relies of various other daemons to work


No, real case is exactly opposite...all other daemons relies of SMF.

After initialisation, kernel creates PID 0 (sched), and after that,
starts PID 1 (init).
The init process reads the /etc/inittab and /etc/default/init and
follows the instructions.

Inittab in my OI:
------
ap::sysinit:/sbin/autopush -f /etc/iu.ap
sp::sysinit:/sbin/soconfig -d /etc/sock2path.d
smf::sysinit:/lib/svc/bin/svc.startd    >/dev/msglog 2<>/dev/msglog 
</dev/console
p3:s1234:powerfail:/usr/sbin/shutdown -y -i5 -g0 >/dev/msglog 2<>/dev/msglog
--------


So, only 2 daemons that SMF depends on are SMF itself
/lib/svc/bin/svc.startd
/lib/svc/bin/svc.configd

with PID 10 and PID 12 respectively by default.

For example, if I kill svc.startd, it automatically restarts (although 
this can be turned off through the inittab..) with another PID, but 
nothing in PID 1 except /sbin/init
-------------
root@hipster-oi:~# kill 10
root@hipster-oi:~# ptree
12    /lib/svc/bin/svc.configd
46    /sbin/dlmgmtd
48    /lib/inet/netcfgd
......
....
...
1127  gkrellm
1220  /usr/bin/gnome-terminal -x /bin/sh -c cd '/home/draganoi' && exec 
$SHELL
   1221  gnome-pty-helper
   1223  /bin/bash
     1234  bash
       1241  ptree
1240  /lib/svc/bin/svc.startd
root@hipster-oi:~#
---------


Beautiful in simplicity :)

Cheers,
Dragan