Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 449100 - Flaky startup dependencies - maybe even bug
Summary: Flaky startup dependencies - maybe even bug
Status: RESOLVED DUPLICATE of bug 266386
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-28 21:40 UTC by PetaMem R&D
Modified: 2012-12-29 02:42 UTC (History)
0 users

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 PetaMem R&D 2012-12-28 21:40:32 UTC
/etc/init.d/sshd has

depend() {
        use logger dns
       need net
}

which I'd interpret as: we need "any network". Now my notebook can have eth0 or wlan0 (or both) up. Normally it starts up with eth0 up. I have written myself a "switch_net" script which looks like this:

------------------------------
#!/bin/bash

WLAN_ACTIVE=`ifconfig | grep eth0`

echo $WLAN_ACTIVE

if [[ -z $WLAN_ACTIVE ]]; then
  echo 'wlan0 active - switching to eth0'
  /etc/init.d/net.eth0 start
  /etc/init.d/net.wlan0 stop
  exit 0
fi

echo 'eth0 active - switching to wlan0'
/etc/init.d/net.wlan0 start
/etc/init.d/net.eth0 stop
-----------------------------

I would expect that if wlan0 is up, I could restart sshd without hassle. Unfortunately no. 

-----------------------------
sol init.d # /etc/init.d/sshd restart
 * Bringing up interface eth0
 *   dhcp ...
 *     Running dhcpcd ...
dhcpcd[31187]: version 5.6.4 starting
dhcpcd[31187]: eth0: waiting for carrier
dhcpcd[31187]: timed out                                                  [ !! ]
 * ERROR: net.eth0 failed to start
 * ERROR: cannot start sshd as net.eth0 would not start
-----------------------------

If I remember correctly, "need net" means "any net" so why is sshd still hooked to eth0?

Reproducible: Always

Actual Results:  
sshd fails to restart

Expected Results:  
sshd should restart without hassle

if I simply remove "need net" (crude hack), sshd restarts - and works - without hassle.
Comment 1 Mike Gilbert gentoo-dev 2012-12-29 02:42:34 UTC

*** This bug has been marked as a duplicate of bug 266386 ***