Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]How to run apache when NetworkManager is inactive?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jody
Guru
Guru


Joined: 16 Oct 2007
Posts: 509
Location: Switzerland

PostPosted: Mon Mar 09, 2015 8:31 am    Post subject: [SOLVED]How to run apache when NetworkManager is inactive? Reply with quote

Hi
On my Laptop i have kernel 3.10.7-gentoo-r1, NetworkManager 0.9.8.8 and apache 2.2.25, and i use OpenRC (not systemd)

Whenever the WiFi is disconnected, NetworkManager goes into an inactive state and kills the NetworkManager.

I can't start apache manually when NetworkManager is inactive:
Code:
jody@raven ~ $ sudo /etc/init.d/apache2 start
 * WARNING: dnsmasq is scheduled to start when NetworkManager has started
 * WARNING: dnsmasq is scheduled to start when NetworkManager has started
 * WARNING: netmount is scheduled to start when NetworkManager has started
 * WARNING: apache2 is scheduled to start when NetworkManager has started


I am currently working on a local web app on my laptop, and I also want to work on it when i don't have access to a LAN.

So the question is: how can i run apache when the NetworkManager is inactive or stopped?

Thanks
Jody


Last edited by jody on Mon Mar 09, 2015 5:40 pm; edited 1 time in total
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Mon Mar 09, 2015 8:39 am    Post subject: Re: How to run apache when NetworkManager is inactive? Reply with quote

jody wrote:
So the question is: how can i run apache when the NetworkManager is inactive or stopped?

jody ... it should be sufficent to do the following:

/etc/rc.conf
Code:
rc_apache2_need="!net"

HTH & best ... khay
Back to top
View user's profile Send private message
jody
Guru
Guru


Joined: 16 Oct 2007
Posts: 509
Location: Switzerland

PostPosted: Mon Mar 09, 2015 5:39 pm    Post subject: Reply with quote

Thanks - this works.

NetworkManager doesn't kill apache anymore when i disconnect it from the LAN.

apache does, however, try to start NetworkManager when it is started itself.
But this is ok - the NetworkManaer is in state "inactive" but apache runs nonetheless.

Thank you
Jody
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum