help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

adding udev rule


From: Jean-Baptiste Volatier
Subject: adding udev rule
Date: Sun, 20 Dec 2020 19:33:38 +0000

Hi!

I am trying to setup a udev rule to enable wake on lan on my ethernet adapter. 
For that I have added to my config.scm:

(define %wol-udev-rule
  (udev-rule
    "90-wol.rules"
    (string-append "ACTION==\"online\", KERNEL==\"enp0s25\", "
                   "PROGRAM+=\"/usr/bin/ethtool -s enp0s25 wol g\"\n")))


And:

(operating-system
  ...
  (services
   (append
    (list ...
          (extra-special-file "/usr/bin/ethtool"
                    (file-append ethtool "/sbin/ethtool"))
          (udev-rules-service 'wol %wol-udev-rule)
          ...
    %desktop-services))
   ...
)

Somehow this does not work, it might be because of my udev rule but on the 
other hand the output of "udevadm test /devices/ ... /enp3s0" does not show my 
90-wol.rules so it looks like it is not added ?
Any thoughts ?

> sudo udevadm test 
> /devices/pci0000:00/0000:00:01.2/0000:01:00.0/0000:02:04.0/0000:03:00.0/net/enp3s0
calling: test
version 3.2.9
This program is for debugging only, it does not run any program
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.

=== trie on-disk ===
tool version:          3
file size:         8270736 bytes
header size             80 bytes
strings            2110312 bytes
nodes              6160344 bytes
Load module index
timestamp of 
'/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/etc/udev/rules.d' 
changed
Reading rules file: 
/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/lib/udev/rules.d/50-udev-default.rules
Reading rules file: 
/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/lib/udev/rules.d/60-block.rules
Reading rules file: 
/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/lib/udev/rules.d/60-cdrom_id.rules
Reading rules file: 
/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/lib/udev/rules.d/60-drm.rules
Reading rules file: 
/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/lib/udev/rules.d/60-evdev.rules
Reading rules file: 
/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/lib/udev/rules.d/60-input-id.rules
Reading rules file: 
/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/lib/udev/rules.d/60-persistent-alsa.rules
Reading rules file: 
/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/lib/udev/rules.d/60-persistent-input.rules
Reading rules file: 
/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/lib/udev/rules.d/60-persistent-storage-tape.rules
Reading rules file: 
/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/lib/udev/rules.d/60-persistent-storage.rules
Reading rules file: 
/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/lib/udev/rules.d/60-persistent-v4l.rules
Reading rules file: 
/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/lib/udev/rules.d/60-sensor.rules
Reading rules file: 
/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/lib/udev/rules.d/60-serial.rules
Reading rules file: 
/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/lib/udev/rules.d/64-btrfs.rules
Reading rules file: 
/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/lib/udev/rules.d/70-joystick.rules
Reading rules file: 
/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/lib/udev/rules.d/70-mouse.rules
Reading rules file: 
/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/lib/udev/rules.d/70-touchpad.rules
Reading rules file: 
/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/lib/udev/rules.d/75-net-description.rules
Reading rules file: 
/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/lib/udev/rules.d/75-probe_mtd.rules
Reading rules file: 
/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/lib/udev/rules.d/78-sound-card.rules
Reading rules file: 
/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/lib/udev/rules.d/80-drivers.rules
Reading rules file: 
/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/lib/udev/rules.d/80-net-name-slot.rules
rules contain 24576 bytes tokens (2048 * 12 bytes), 9493 bytes strings
1086 strings (16592 bytes), 683 de-duplicated (7503 bytes), 404 trie nodes used
IMPORT builtin 'net_id' 
/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/lib/udev/rules.d/75-net-description.rules:6
IMPORT builtin 'hwdb' 
/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/lib/udev/rules.d/75-net-description.rules:12
NAME 'enp3s0' 
/gnu/store/z1ngxz9rc1vqpbwvvlm8l37fa0q6ga5x-eudev-3.2.9/lib/udev/rules.d/80-net-name-slot.rules:12
created db file '/run/udev/data/n2' for 
'/devices/pci0000:00/0000:00:01.2/0000:01:00.0/0000:02:04.0/0000:03:00.0/net/enp3s0'
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:01.2/0000:01:00.0/0000:02:04.0/0000:03:00.0/net/enp3s0
ID_BUS=pci
ID_MODEL_FROM_DATABASE=RTL8111/8168/8411 PCI Express Gigabit Ethernet 
Controller (Onboard Ethernet)
ID_MODEL_ID=0x8168
ID_NET_NAME_MAC=enxb42e998752a8
ID_NET_NAME_PATH=enp3s0
ID_OUI_FROM_DATABASE=GIGA-BYTE TECHNOLOGY CO.,LTD.
ID_PCI_CLASS_FROM_DATABASE=Network controller
ID_PCI_SUBCLASS_FROM_DATABASE=Ethernet controller
ID_VENDOR_FROM_DATABASE=Realtek Semiconductor Co., Ltd.
ID_VENDOR_ID=0x10ec
IFINDEX=2
INTERFACE=enp3s0
SUBSYSTEM=net
USEC_INITIALIZED=6844556
Unload module index






reply via email to

[Prev in Thread] Current Thread [Next in Thread]