1

I am working on a system running Centos 7 and I'm pretty new to Linux in general. I have a task to re-implement some startup services that was supported automatically by 3rd party tool in our previous system which runs on Centos 6.6 In our old system, some startup services (registered via chkconfig) can display custom message to the screen, and also able to receive user input if required, although they are configured to run at boot time, before login prompt. However as I tried to copy the service scripts (which are basically bash shell scripts) from old system to new system and register them with chkconfig, I couldn't make the work the same. Messages did not get output to screen and user input prompt didn't work either. I digged into one of the service script and try to log into file output of some command like tty, who -r and get different results for old and new system. With old system, the logs are:

tty is /dev/console
run level is           run-level 3  2015-12-30 03:21

With the new system, the logs are:

tty is not a tty
run level is

Based on output of tty I understand why the startup services on new system cannot receive user I/O since it's not a tty, while on old system it's /dev/console which is a tty.

Since I'm pretty new to Linux, my concern is how can I make a startup service (registered with chkconfig) to have tty is /dev/console or more generally, have a tty to receive user I/O before login prompt. And if possible, please help to explain the cause of the different I saw as described in above logs.

(Sorry for the long question and thank you for reading it :-) )

Duc Nguyen
  • 11
  • 1

0 Answers0