Значит видно, что runlevel по умолчанию 2. Его можно в процессе работы изменить на 3 и обратно. При изменении на 3 должна выполняться соответствующая команда. Это в мои интересы не входит, поэтому я указываю, что при установлении уровня 3, должен быть выполнен тот же скрипт, что и при уровне 2. Типа всё то же самое.id:2:initdefault:
si::sysinit:/etc/init.d/rcS
~~:S:wait:/sbin/sulogin
#нас будут интересовать эти три две строки
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 2
#и вот эта строка, которую я добавил сам
my:23:wait:/bin/echo Hello, word!
Какого эффекта я жду? При изменении уровня должна выполниться ДРУГАЯ указанная команда.l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 2
Чё-то никакого хелловорда я не наблюдаюmy:23:wait:/bin/echo Hello, word!
Shell
user@astra:~$
user@astra:~$ sudo runlevel
N 2
user@astra:~$ sudo telinit 3
user@astra:~$
user@astra:~$ sudo runlevel
2 3
user@astra:~$ sudo telinit 2
user@astra:~$
user@astra:~$ sudo runlevel
3 2
user@astra:~$++++++++++++++++++++++++++++++++++++++++++++++++++
ЧЯДНТ? Спасибо, кто откликнется. Вместо /bin/echo писал другие команды, бесполезно.man init
CHANGING RUNLEVELS
After it has spawned all of the processes specified, init waits for one of its descendant processes to die, a powerfail signal, or until it is signaled by telinit to change the system's runlevel. When one of the above three conditions occurs, it re-examines the /etc/inittab file. New entries can be added to this file at any time. However, init still waits for one of the above three conditions to occur. To provide for an instantaneous response, the telinit Q or q command can wake up init to re-examine the /etc/inittab file.
.......................................
TELINIT
/sbin/telinit is linked to /sbin/init. It takes a one-character argument and signals init to perform the appropriate action. The following arguments serve as directives to telinit:
0,1,2,3,4,5 or 6
tell init to switch to the specified run level.