[systemd-devel] Network.service for wifi
Oleksii Shevchuk
alxchk at gmail.com
Thu Dec 6 01:47:49 PST 2012
I use this:
grep -R wlan2 /etc/udev/rules.d/
/etc/udev/rules.d/70-net.rules:SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:27:19:f5:62:90", ATTR{dev_id}=="0x0", ATTR{type}=="1", NAME="wlan2", ENV{SYSTEMD_WANTS}="wireless at wlan2.target", GOTO="net_ok"
# cat /etc/systemd/system/wireless\@.target
[Unit]
Description=Start services for wireless device %i
# cat /etc/systemd/system/karma\@.target
[Unit]
Description=KARMA hostapd attack suite (on %i interface)
BindsTo=karma-network@%i.service
Wants=karma-dhcp@%i.service karma-hostapd@%i.service
StopWhenUnneeded=yes
Conflicts=kismet@%i.service
[Install]
WantedBy=wireless@%i.target
# systemctl enable karma at wlan2.target
ln -s '/etc/systemd/system/karma at .target' '/etc/systemd/system/wireless at wlan2.target.wants/karma at wlan2.target'
# systemctl status sys-subsystem-net-devices-wlan2.device
sys-subsystem-net-devices-wlan2.device - USB2.0_WLAN
Loaded: loaded
Active: active (plugged) since Чт. 2012-12-06 11:44:06 EET; 2min 24s ago
Device: /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3:1.0/net/wlan2
# systemctl status karma at wlan2.target
karma at wlan2.target - KARMA hostapd attack suite (on wlan2 interface)
Loaded: loaded (/etc/systemd/system/karma at .target; enabled)
Active: active since Чт. 2012-12-06 11:44:07 EET; 2min 45s ago
More information about the systemd-devel
mailing list