Web lists-archives.com

Re: Strange message during boot




On Thu, Jan 11, 2018 at 10:27:33AM -0500, The Wanderer wrote:
> On 2018-01-11 at 10:23, Brian wrote:
> 
> > On Thu 11 Jan 2018 at 09:45:35 -0500, The Wanderer wrote:
> > 
> >> What init system are you running?
> >> 
> >> Usually, this can be determined by 'dlocate /sbin/init', but I can't
> >> guarantee that that will hold for all systems.
> > 
> > Guaranteed: 'cat /proc/1/comm'.
> 
> On my system:
> 
> $ dlocate /sbin/init
> sysvinit-core: /sbin/init
> $ cat /proc/1/comm
> init
> 
> So the former command produces recognizably useful information, whereas
> the latter does not.
> 
> I can't be sure what the latter command would output on a different
> system, not having tested it - but since AFAIK the standard practice is
> to launch the init system via /sbin/init (symlinked to something else if
> necessary) regardless, I would expect the command to be 'init' in all
> cases.

wooledg:~$ ls -l /sbin/init
lrwxrwxrwx 1 root root 20 Jul  5  2017 /sbin/init -> /lib/systemd/systemd
wooledg:~$ cat /proc/1/comm
systemd

P.S. "ls -l /sbin/init" is the command we usually give to people in
#debian when they ask similar questions.