You are not logged in.

#1 2013-01-11 22:02:42

eDio
Member
From: Ukraine, Kyiv
Registered: 2008-12-02
Posts: 422

systemd enabled services won't work on startup, will on restart

Hi.
I have:

  • a pretty old though up to date Arch installation with systemd (migrated from initscripts)

  • 2 enabled systemd services, that are the subject of this post wink
    systemd-nvclock-unit — to apply nvclock settings on boot
    systemd-network-units — for static network configuration

The problem is that those 2 units never work on startup (though, are enabled).
nvclock
Log for this one says, that my card doesn't support fanspeed control. Perhaps 'Coolbits' option in X configuration fails to apply in time.
Anyway, service works as expected after it is being restarted.

network
Log seems to be absolutely fine. ip addr, ip route show that settings have been applied. Though, I have no network, until service is explicitly restarted.

Code of those 2 units, just for convenience

[Unit]	
Description=Network Connectivity	
Wants=network.target	
Before=network.target
	
[Service]	
Type=oneshot	
RemainAfterExit=yes	
EnvironmentFile=/etc/conf.d/network	
ExecStart=/sbin/ip link set dev ${interface} up
ExecStart=/sbin/ip addr add ${address}/${netmask} broadcast ${broadcast} dev ${interface}
ExecStart=/sbin/ip route add default via ${gateway}
ExecStop=/sbin/ip addr flush dev ${interface}	
ExecStop=/sbin/ip link set dev ${interface} down
	
[Install]	
WantedBy=multi-user.target
[Unit]
Description=nvclock daemon
After=systemd-user-sessions.service

[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/conf.d/nvclock
ExecStart=/usr/bin/nvclock -n ${nvclk} -m ${memclk} -F ${fanspeed} -f
ExecReload=/usr/bin/nvclock -n ${nvclk} -m ${memclk} -F ${fanspeed} -f
ExecStop=/usr/bin/nvclock -r -F ${fanspeed_default} -f

[Install]
WantedBy=multi-user.target

So, I'd like to make these 2 services work flawlessly on start-up.
Any help is appreciated. And thanks in advance.

Offline

Board footer

Powered by FluxBB