You are not logged in.

#1 2013-10-13 08:36:35

Zagorax
Member
Registered: 2013-10-11
Posts: 5

network setup seems correct, but systemctl mark it as failed

Hi,

following the wiki, I've created the file /etc/conf.d/netowork@eth0, with following content:

address=10.42.0.1
netmask=24
broadcast=10.42.0.255

Then, I've created the file /etc/systemd/system/network@eth0.service:

[Unit]
Description=Network connectivity (%i)
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device

[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/conf.d/network@%i

ExecStart=/usr/bin/ip link set dev %i up
ExecStart=/usr/bin/ip addr add ${address}/${netmask} broadcast ${broadcast} dev %i
ExecStart=/usr/bin/ip route add default via ${gateway}

ExecStop=/usr/bin/ip addr flush dev %i
ExecStop=/usr/bin/ip link set dev %i down

[Install]
WantedBy=multi-user.target

And I've enabled the script and disabled dhcpcd@eth0.service, which was there by default. On boot, eth0 gets right ip address and settings, however, if you write check the list of active services, I see:

UNIT                         LOAD   ACTIVE SUB     DESCRIPTION
cronie.service               loaded active running Periodic Command Scheduler
dbus.service                 loaded active running D-Bus System Message Bus
dnsmasq.service              loaded active running A lightweight DHCP and cachin
getty@tty1.service           loaded active running Getty on tty1
iptables.service             loaded active exited  Packet Filtering Framework
kmod-static-nodes.service    loaded active exited  Create list of required stati
network@eth0.service         loaded failed failed  Network connectivity (eth0)
ntpd.service                 loaded active running Network Time Service
serial-getty@ttyAMA0.service loaded active running Serial Getty on ttyAMA0
sshd.service                 loaded active running OpenSSH Daemon
systemd-journald.service     loaded active running Journal Service
systemd-logind.service       loaded active running Login Service
systemd-modules-load.service loaded active exited  Load Kernel Modules
systemd-random-seed.service  loaded active exited  Load/Save Random Seed
systemd-remount-fs.service   loaded active exited  Remount Root and Kernel File 
systemd-sysctl.service       loaded active exited  Apply Kernel Variables
systemd-t...etup-dev.service loaded active exited  Create static device nodes in
systemd-t...es-setup.service loaded active exited  Recreate Volatile Files and D
systemd-udev-trigger.service loaded active exited  udev Coldplug all Devices
systemd-udevd.service        loaded active running udev Kernel Device Manager
systemd-update-utmp.service  loaded active exited  Update UTMP about System Rebo
systemd-u...sessions.service loaded active exited  Permit User Sessions
systemd-v...le-setup.service loaded active exited  Setup Virtual Console
user@1000.service            loaded active running User Manager for 1000
wicd.service                 loaded active running Wicd a wireless and wired net

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

25 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

Where, as you can see at line 7, it marks my network script as failed. I thought wicd could interfere, but in wicd settings I've set no wired interface, so that it manages only wlan0.

Offline

#2 2013-10-13 09:03:05

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: network setup seems correct, but systemctl mark it as failed

Can you assign a static ip adress from the console, with the ip command ?
https://wiki.archlinux.org/index.php/Ne … assignment

Offline

#3 2013-10-13 09:21:41

Zagorax
Member
Registered: 2013-10-11
Posts: 5

Re: network setup seems correct, but systemctl mark it as failed

No. Issued the command, but ifconfig shows that my ip is still the same I've assigned to it at boot.

Offline

#4 2013-10-13 09:32:52

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: network setup seems correct, but systemctl mark it as failed

Disable any networking services that start at boot, reboot, and follow the link i posted. Then post the output of the commands, and don't run only the first command.
EDIT: Do not use ifconfig, use ip.

Last edited by teateawhy (2013-10-13 09:34:00)

Offline

Board footer

Powered by FluxBB