Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 8660 - feature suggestion: "/etc/init.d/<service> start" (or similar) could start all services dependent on service
Summary: feature suggestion: "/etc/init.d/<service> start" (or similar) could start al...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Low enhancement (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-02 17:37 UTC by Antti Sykäri
Modified: 2002-10-12 10:30 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Sykäri 2002-10-02 17:37:14 UTC
So, I would like, for example, "/etc/init.d/net.eth0 start" to start all  
services that are on by default, but which depend on that (if they have not  
been started yet)  
  
The rationale for this is:  
  
1. The restarting of services that have failed to start would be easier. 
 
For example, /etc/init.d/net.eth0 often fails to start up in the boot.  
This happens when I cannot get a DHCP address (I have a  cable modem) 
  
I have several services depending on the success of net.eth0, namely ssh and  
postfix. And when net.eth0 doesn't start on the boot, those also don't get  
started.  
  
Now, when I start net.eth0 manually, I need to start postfix and sshd  
manually, which is tedious. I would like them to be started automatically,  
when net.eth0 starts. Imagine that I would have 10 network services. Then the 
easiest measure I could take would be rebooting the system until I get an IP 
address which is not clearly the right way. 
 
2. The behavior of "start" should be similar to the behaviors of "stop" and 
"restart" 
 
See what happens when I stop and start net.eth0 manually:  
  
cs191238:/home/jsykari# /etc/init.d/net.eth0 stop  
 * Stopping DDClient...                             [ ok ]  
 * Stopping postfix...                              [ ok ]  
 * Stopping sshd...                                 [ ok ]  
 * Bringing eth0 down...  
 *   Waiting for dhcpcd to shutdow....done          [ ok ]  
cs191238:/home/jsykari#   
cs191238:/home/jsykari# /etc/init.d/net.eth0 start  
 * Bringing eth0 up...                              [ ok ]  
cs191238:/home/jsykari#  
 
Note that the result is _not_ the same as with "etc/init.d/net.eth0 restart" 
(which will simply restart every service) 
 
Then, the behavior of "start" would be similar to the behavior of consequent 
"stop" and "restart" (they all affect the dependencies of the service in 
question)   
 
 
So, as a conclusion, it would be very nice if just "net.eth0 start" would  
bring up the device _and_ those devices which depend and should be running  
(i.e. they are configured to run on current runlevel via rc-update) but are  
not running for some reason. 
   
This functionality should perhaps be implemented as another command,  
such as "startall" or "startdeps":  
  
# /etc/init.d/net.eth0 startall  
Starting net.eth0... ok  
Starting sshd... ok  
Starting postfix... ok  
  
Then, actually, runlevels could be modeled as services which would depend on  
everything on that runlevel (or maybe not), and booting the system would just  
mean "/etc/init.d/default startall" or similar.
Comment 1 Matt Taylor 2002-10-03 15:38:36 UTC
I've ran into this problem also.  I stop the network, or it fails to start, then
later when I start it I have to go thru and start the 15 or so services that got
stoped when net.eth0 stoped, but don't start when it starts.
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2002-10-07 13:10:53 UTC
Try:

# rc