You are not logged in.
While still somewhat new to Arch, I've already installed it several times (what can I say? I enjoy the process of installing an OS) in various configurations. Mostly I was following the beginner's guide, using ifplugd and the net-auto-wired.service for IP connectivity. While reading these forums, I discovered references to https://wiki.archlinux.org/index.php/Ne … IP_address, which looks like a better way to configure a static IP.
My first question: which way is most "correct" and why?
Secondly, it seems odd to me that I (the user) should have to create my own "network.service" file in /etc/systemd/system. I've had no trouble following the directions and getting it to work, but shouldn't that be something that's already built into Arch itself? It's not unprecedented to have template configuration files present "out-of-the-box", such as /etc/network.d/examples/* or /etc/skel/.xinitrc. So maybe /etc/systemd/system/network.service should be present in the base installation?
Offline
Correct way is netcfg. You shouldn't have to make a service file; that method causes more problems than its worth IMO.
Last edited by graysky (2012-12-26 22:04:11)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
That wiki link is for wireless, Wired is, strangely, elsewhere: https://wiki.archlinux.org/index.php/Sy … et_network.
The correct way is whatever you want.
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
The correct way is whatever you want.
This. Arch is what you make of it !!
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
Thanks for the replies. Graysky, could you elaborate on the problems you have seen with network.service? I tried it on at least 3 different installations (including my Raspberry Pi, which I just got yesterday), and I haven't had any problems. Well, other than one ones I caused myself by sloppy typing.
To my second question: Is there a reason why /etc/systemd/system/network.service isn't included by default in the base installation?
Offline
The service file you created doesn't tell systemd that it is providing network.target at all. Other services that require a functional network may start out-of-order and therefor fail.
Last edited by graysky (2012-12-27 22:13:10)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Uhm, the service files from the wiki have the exact same dependency information as the service files provided by netcfg ([Unit] Before/Wants=network.target, [Install] WantedBy=multi-user.target).
Last edited by ZekeSulastin (2012-12-28 19:56:48)
Offline
I just gave netcfg a try and I'm definitely sold. I made a test machine that mounts a cifs share via smbclient, and the share mounts and unmounts flawlessly when using netcfg. With network.service, the share didn't mount properly during boot, and caused a 60-second hang during shutdown because the network connection was pulled before the share got unmounted. I'm writing this for the benefit of others who might be searching on such an issue.
One thing: The template "ethernet-static" file (in /etc/network.d/examples/) is incomplete IMO. It doesn't have an entry for NETMASK, so I had to do some googling to find the proper syntax. I was also unsure of how to configure multiple DNS servers, so I just took a guess and made a second line for the second server, so it looks like this:
DNS=('10.1.1.101')
DNS=('10.1.1.102')
And does that mean /etc/resolve.conf isn't used at all?
Hopefully my questions aren't too overbearing... I'm still trying to get a handle on all these different options.
Offline