You are not logged in.
My network didn't work after I enabled NetworkManager.service
[hilo@hilo ~]$ sudo systemctl enable NetworkManager.service
ln -s '/usr/lib/systemd/system/NetworkManager.service' '/etc/systemd/system/dbus-org.freedesktop.NetworkManager.service'
ln -s '/usr/lib/systemd/system/NetworkManager.service' '/etc/systemd/system/multi-user.target.wants/NetworkManager.service'I found Network-Manager.service confilcts with net-auto-wireless.service(it start a process which named wpa_supplicant)
[hilo@hilo ~]$ ps aux|grep -i network
root 313 0.0 0.0 250268 6916 ? Ssl 01:14 0:01 /usr/sbin/NetworkManager --no-daemon
root 346 0.1 0.0 32152 1572 ? Ss 01:14 0:00 wpa_supplicant -B -P /run/wpa_supplicant_wlan0.pid -i wlan0 -D nl80211,wext -c/run/network/wpa.wlan0/wpa.conf -WThe solution is to disable net-auto-wireless.service
[hilo@hilo ~]$ sudo systemctl disable net-auto-wireless.service
[sudo] password for hilo:
rm '/etc/systemd/system/multi-user.target.wants/net-auto-wireless.service'=============
Note:
The new initscripts configuration has been moved from rc.conf to systemd.--Refer to Systemd wiki
=============
Very grateful to all of you!
Last edited by hilojack (2012-11-06 16:20:23)
Offline
how do you figure they conflict? The stock service is NetworkManager or networkmanager, did you create a custom service? If you disable network.target, you're most likely going to screw up your network access completely. "network" in rc.conf has nothing to do at all with network.target.
Last edited by Scimmia (2012-11-04 16:07:03)
Online
I've had to do that too:
sudo ln -s /dev/null /etc/systemd/system/network.targetYou can mask a service. This is like disabling a service, but on steroids. It not only makes sure that service is not started automatically anymore, but even ensures that a service cannot even be started manually anymore. This is a bit of a hidden feature in systemd, since it is not commonly useful and might be confusing the user. But here's how you do it:
Offline
Good that it works for you adrianx, but the question might be how that network.target configuration file got there to your custom /etc/systemd/system in the first place. You both seem to mix up nomenclatura of "target" and "service", as Scimmia was suggesting already. Have a look at man systemd.target or
https://wiki.archlinux.org/index.php/Systemd#Targets
The packaged network.target is also mentioned on the wiki and in the faq.
Offline
how do you figure they conflict? The stock service is NetworkManager or networkmanager, did you create a custom service? If you disable network.target, you're most likely going to screw up your network access completely. "network" in rc.conf has nothing to do at all with network.target.
I did not create any custom service.
[hilo@hilo ~]$ ps aux|grep -i network
root 313 0.0 0.0 250268 6916 ? Ssl 01:14 0:01 /usr/sbin/NetworkManager --no-daemon
root 346 0.1 0.0 32152 1572 ? Ss 01:14 0:00 wpa_supplicant -B -P /run/wpa_supplicant_wlan0.pid -i wlan0 -D nl80211,wext -c/run/network/wpa.wlan0/wpa.conf -W
[hilo@hilo ~]$sudo kill 346 #The network works well as soon as I kill wap_supplicantI guess there is a place which has the wap_supplicant autostared.But I don't know where it is.
Good that it works for you adrianx, but the question might be how that network.target configuration file got there to your custom /etc/systemd/system in the first place. You both seem to mix up nomenclatura of "target" and "service", as Scimmia was suggesting already. Have a look at man systemd.target or
https://wiki.archlinux.org/index.php/Systemd#Targets
The packaged network.target is also mentioned on the wiki and in the faq.
I'll have a look at it tommorw. Appreciate!
Last edited by hilojack (2012-11-06 16:08:29)
Offline
hilojack, you still haven't explained why you think networkmanager.service conflicts with network.target.
Strike0, if you read adrianx's link, you'll get a clearer idea of what he's doing. However, that document is over 18 months old - these days we have 'systemctl mask foo.bar' instead.
Offline
hilojack, you still haven't explained why you think networkmanager.service conflicts with network.target.
Strike0, if you read adrianx's link, you'll get a clearer idea of what he's doing. However, that document is over 18 months old - these days we have 'systemctl mask foo.bar' instead.
Sorry.Somebody told me about that.It's my mistake.
Offline
I found that Network-Manager.service confilcts with network.target.
I don't know how to disable network(I have no file "/etc/rc.conf")[hilo@hilo ~]$ sudo systemctl disable network.target #Why it still starts when laptop reboot? [hilo@hilo ~]$ sudo systemctl enable network.target The unit files have no [Install] section. They are not meant to be enabled using systemctl.Many thanks for yr help!
Disabling network.target is pointless as it is not loaded automatically.
First, do not confuse network.target and network.service. network.target is a special unit used as a 'placeholder'. By itself it does absolutely nothing. A typical dependency graph is:
NM --> network.target --> daemon-which-needs-network.serviceFor instance, consider ntpd.service and netcfg.service. The former has After=network.target meaning that NTP will only start when network is available. However, the latter has Before=network.target. Thus, netcfg starts first, loads a profile, then network.target becomes available and ONLY then NTP starts.
I don't have NM but exactly the same must apply to it. Otherwise, there is a bug in NM.
Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd
Offline
Oh,I totally misunderstand the netwrok.target(It is not network.service).
Happy to get the answer to this problem and very grateful to all of you!
Last edited by hilojack (2012-11-06 16:19:09)
Offline