Bug 1019822 - Network not started when /etc/rc.d/rc.local executed
Network not started when /etc/rc.d/rc.local executed
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
19
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Lukáš Nykrýn
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-16 09:09 EDT by benjamin.barras@epfl.ch
Modified: 2013-10-17 08:39 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-17 08:39:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description benjamin.barras@epfl.ch 2013-10-16 09:09:00 EDT
Description of problem:

Network not started when /etc/rc.d/rc.local started.
wget doesn't work !!!

Version-Release number of selected component (if applicable):


How reproducible:
put this line in /etc/rc.d/rc.local :

wget -O /root/.ssh/authorized_keys http://myServer/authorized_keys

with

#!/bin/sh

at the first line of course !

Steps to Reproduce:
1. Put the line above
2: chmod +x /etc/rc.d/rc.local

Actual results:

ls -al .ssh
0 Oct 16 14:58 authorized_keys

Expected results:

216 Jan 24  2013 authorized_keys

Additional info:

If I add this line in /etc/rc.d/rc.local before wget :

sleep 5

and after reboot :

ls -al .ssh
216 Jan 24  2013 authorized_keys

it's ok.
Comment 1 Lukáš Nykrýn 2013-10-16 09:22:06 EDT
Are you using NetworkManager?
Comment 2 benjamin.barras@epfl.ch 2013-10-16 09:34:28 EDT
It's a fresh installation with a kickstart file. If I look, I have this :

systemctl status NetworkManager.service
NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled)
   Active: active (running) since Wed 2013-10-16 15:01:22 CEST; 27min ago
 Main PID: 444 (NetworkManager)
   CGroup: name=systemd:/system/NetworkManager.service
           └─444 /usr/sbin/NetworkManager --no-daemon

systemctl status network.target
network.target - Network
   Loaded: loaded (/usr/lib/systemd/system/network.target; static)
   Active: active since Wed 2013-10-16 15:01:22 CEST; 27min ago
     Docs: man:systemd.special(7)
           http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget
Comment 3 Lukáš Nykrýn 2013-10-16 10:22:00 EDT
So, actually this has to do nothing with initscripts, but I think that correct solution for you would be to set 'systemctl enable NetworkManager-wait-online.service'

http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
Comment 4 Lukáš Nykrýn 2013-10-16 10:56:15 EDT
or add
nm-online
to rc.local before wget
Comment 5 benjamin.barras@epfl.ch 2013-10-17 08:16:05 EDT
(In reply to Lukáš Nykrýn from comment #3)
> So, actually this has to do nothing with initscripts, but I think that
> correct solution for you would be to set 'systemctl enable
> NetworkManager-wait-online.service'
> 
> http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

systemctl enable NetworkManager-wait-online.service

and all it's ok !

Thanks & best regards,
Benjamin

Note You need to log in before you can comment on or make changes to this bug.