Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Sun Aug 20, 2017 4:50 am


Guides and tutorials for Red Hat Linux, Debian, Suse and others.

Author Message
debuser
  Post  Post subject: Linux reloading inittab without reboot  |  Posted: Thu Nov 26, 2009 4:49 am

Joined: Thu Aug 06, 2009 2:48 am
Posts: 105

Offline
 

Linux reloading inittab without reboot

Linux refresh init process after modifying inittab without reboot

man init
Quote:
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.

If init is not in single user mode and receives a powerfail signal (SIGPWR), it reads the file /etc/powerstatus. It then starts a command based on the
contents of this file:

F(AIL) Power is failing, UPS is providing the power. Execute the powerwait and powerfail entries.

O(K) The power has been restored, execute the powerokwait entries.

L(OW) The power is failing and the UPS has a low battery. Execute the powerfailnow entries.

If /etc/powerstatus doesn't exist or contains anything else then the letters F, O or L, init will behave as if it has read the letter F.

Usage of SIGPWR and /etc/powerstatus is discouraged. Someone wanting to interact with init should use the /dev/initctl control channel - see the source
code of the sysvinit package for more documentation about this.

When init is requested to change the runlevel, it sends the warning signal SIGTERM to all processes that are undefined in the new runlevel. It then
waits 5 seconds before forcibly terminating these processes via the SIGKILL signal. Note that init assumes that all these processes (and their descenĂ¢
dants) remain in the same process group which init originally created for them. If any process changes its process group affiliation it will not
receive these signals. Such processes need to be terminated separately.

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.

a,b,c tell init to process only those /etc/inittab file entries having runlevel a,b or c.

Q or q tell init to re-examine the /etc/inittab file.


Following two commands will tell init to re-examine he /etc/inittab file:
Code:
# sudo init q

Code:
# sudo telinit q





Top
Display posts from previous:  Sort by  
E-mail friendPrint view

Topics related to - "Linux reloading inittab without reboot"
 Topics   Author   Replies   Views   Last post 
There are no new unread posts for this topic. How to change crontab editor in Debian Linux

mandrei99

1

3635

Tue Mar 08, 2016 6:53 pm

tsuchan View the latest post

There are no new unread posts for this topic. Linux umount -f: umount2: Device or resource busy

debuser

0

1533

Fri Apr 09, 2010 7:52 am

debuser View the latest post

There are no new unread posts for this topic. Linux Shell: Protecting against accidental output redirection and file overwrite

LaR3

0

1125

Mon Aug 24, 2009 10:14 am

LaR3 View the latest post

There are no new unread posts for this topic. Linux change the password with output from echo command (standard input)

debuser

0

1865

Thu Jan 14, 2010 5:58 pm

debuser View the latest post

There are no new unread posts for this topic. Linux Shell: "Cannot overwrite existing file" when the file is owned by you

LaR3

0

3118

Mon Aug 24, 2009 10:26 am

LaR3 View the latest post

 

Who is online
Users browsing this forum: No registered users and 0 guests
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:  
News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]



phpBB SEO