unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* adding udev rule
@ 2020-12-20 19:33 Jean-Baptiste Volatier
  0 siblings, 0 replies; only message in thread
From: Jean-Baptiste Volatier @ 2020-12-20 19:33 UTC (permalink / raw)
  To: help-guix

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





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-20 19:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-20 19:33 adding udev rule Jean-Baptiste Volatier

unofficial mirror of help-guix@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-user/0 guix-user/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-user guix-user/ https://yhetil.org/guix-user \
		help-guix@gnu.org
	public-inbox-index guix-user

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.user
	nntp://news.gmane.io/gmane.comp.gnu.guix.user


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git