Code : Tout sélectionner
[root@ThinkPadR40 system]# cat /etc/systemd/system/netcfg@.service
[Unit]
Description=Netcfg networking service for profile %i
Requires=systemd-udev-settle.service
#BindTo=sys-subsystem-net-devices-wlan0.device
Before=network.target
#After=sysinit.target
Wants=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/netcfg check-iface %i
ExecStop=-/usr/bin/netcfg down %i
KillMode=none
[Install]
WantedBy=multi-user.target
[root@ThinkPadR40 system]# systemctl status netcfg@wlan0-Livebox-bdb8.service
netcfg@wlan0-Livebox-bdb8.service - Netcfg networking service for profile wlan0-Livebox-bdb8
Loaded: loaded (/etc/systemd/system/netcfg@.service; enabled)
Active: failed (Result: exit-code) since Tue, 2012-10-30 16:16:23 UTC; 2min 25s ago
Process: 190 ExecStart=/usr/bin/netcfg check-iface %i (code=exited, status=1/FAILURE)
CGroup: name=systemd:/system/netcfg@.service/wlan0-Livebox-bdb8
Oct 30 16:16:23 ThinkPadR40 netcfg[190]: :: wlan0-Livebox-bdb8 up interface wlan0 does not exist
Oct 30 16:16:23 ThinkPadR40 netcfg[190]: [fail]
[root@ThinkPadR40 system]# systemctl start netcfg@wlan0-Livebox-bdb8.service
[root@ThinkPadR40 system]#