Problem writing udev script to disable onboard network card | pressku.com

Trending 5 months ago

I'm trying to disable a faulty onboard web paper pinch nan solution suggested successful this answer: https://unix.stackexchange.com/a/467085 . But for immoderate reasons, nan script/commands are incapable to constitute thing to nan filesystem.

My feline /etc/udev/rules.d/90-disable-ens32.rules is:

ACTION=="add", SUBSYSTEM=="net", ENV{ID_NET_NAME_SLOT}=="ens32", RUN+="/etc/udev/remove_onboard_ens32.sh $env{DEVPATH}"

My feline /etc/udev/remove_onboard_ens32.sh is:

__DEV_PATH="$1" echo "$(date)" >> /tmp/ajt.bin_sh.log touch /sys$__DEV_PATH/device/remove echo "1" > /sys$__DEV_PATH/device/remove

I'm not judge if remove_onboard_ens32.sh book is moreover being tally by udev rules, arsenic nan log successful nan /tmp directory is not being created, and besides nan touch and echo commands don't look to beryllium working.

The support of /etc/udev/remove_onboard_ens32.sh is 755 and user/group is root/root. The support of /etc/udev/rules.d/90-disable-ens32.rules is 644 and user/group is root/root.

The consequence aft sudo udevadm power --reload-rules && sudo udevadm trigger followed by udevadm trial --action="add" /devices/pci0000:00/0000:00:1c.0/0000:01:00.0/net/ens32 2>&1 | little is:

This programme is for debugging only, it does not tally immoderate program specified by a RUN key. It whitethorn show incorrect results, because some values whitethorn beryllium different, aliases not disposable astatine a simulation run. Trying to unfastened "/etc/systemd/hwdb/hwdb.bin"... Trying to unfastened "/etc/udev/hwdb.bin"... Trying to unfastened "/usr/lib/systemd/hwdb/hwdb.bin"... Trying to unfastened "/lib/systemd/hwdb/hwdb.bin"... Trying to unfastened "/lib/udev/hwdb.bin"... === trie on-disk === tool version: 253 file size: 12364925 bytes header size 80 bytes strings 2509325 bytes nodes 9855520 bytes Loading kernel module index. Failed to publication $container of PID 1, ignoring: Permission denied Found cgroup2 connected /sys/fs/cgroup/, afloat unified hierarchy Found instrumentality virtualization none. Using default interface naming strategy 'v253'. Parsed configuration record "/usr/lib/systemd/network/99-default.link" Parsed configuration record "/usr/lib/systemd/network/73-usb-net-by-mac.link" Created nexus configuration context. Reading rules file: /usr/lib/udev/rules.d/39-usbmuxd.rules Reading rules file: /usr/lib/udev/rules.d/40-usb-media-players.rules Reading rules file: /usr/lib/udev/rules.d/40-usb_modeswitch.rules Reading rules file: /usr/lib/udev/rules.d/40-vm-hotadd.rules Reading rules file: /usr/lib/udev/rules.d/50-apport.rules Reading rules file: /usr/lib/udev/rules.d/50-firmware.rules Reading rules file: /usr/lib/udev/rules.d/50-udev-default.rules Reading rules file: /usr/lib/udev/rules.d/55-dm.rules Reading rules file: /usr/lib/udev/rules.d/56-hpmud.rules Reading rules file: /usr/lib/udev/rules.d/60-autosuspend.rules Reading rules file: /usr/lib/udev/rules.d/60-block.rules Reading rules file: /usr/lib/udev/rules.d/60-cdrom_id.rules Reading rules file: /usr/lib/udev/rules.d/60-drm.rules Reading rules file: /usr/lib/udev/rules.d/60-evdev.rules Reading rules file: /usr/lib/udev/rules.d/60-fido-id.rules Reading rules file: /usr/lib/udev/rules.d/60-infiniband.rules Reading rules file: /usr/lib/udev/rules.d/60-input-id.rules Reading rules file: /usr/lib/udev/rules.d/60-inputattach.rules Reading rules file: /usr/lib/udev/rules.d/60-libgphoto2-6.rules Reading rules file: /usr/lib/udev/rules.d/60-libsane1.rules Reading rules file: /usr/lib/udev/rules.d/60-pcmcia.rules Reading rules file: /usr/lib/udev/rules.d/60-persistent-alsa.rules Reading rules file: /usr/lib/udev/rules.d/60-persistent-input.rules Reading rules file: /usr/lib/udev/rules.d/60-persistent-storage-dm.rules Reading rules file: /usr/lib/udev/rules.d/60-persistent-storage-tape.rules Reading rules file: /usr/lib/udev/rules.d/60-persistent-storage.rules Reading rules file: /usr/lib/udev/rules.d/60-persistent-v4l.rules Reading rules file: /usr/lib/udev/rules.d/60-sensor.rules Reading rules file: /usr/lib/udev/rules.d/60-serial.rules Reading rules file: /usr/lib/udev/rules.d/60-tpm-udev.rules Reading rules file: /usr/lib/udev/rules.d/60-virtualbox-dkms.rules Reading rules file: /usr/lib/udev/rules.d/60-virtualbox.rules Reading rules file: /usr/lib/udev/rules.d/61-persistent-storage-android.rules Reading rules file: /usr/lib/udev/rules.d/64-btrfs.rules Reading rules file: /usr/lib/udev/rules.d/64-xorg-xkb.rules Reading rules file: /usr/lib/udev/rules.d/65-libwacom.rules Reading rules file: /usr/lib/udev/rules.d/66-snapd-autoimport.rules Reading rules file: /usr/lib/udev/rules.d/69-cd-sensors.rules Reading rules file: /usr/lib/udev/rules.d/69-libmtp.rules Reading rules file: /usr/lib/udev/rules.d/69-wacom.rules Reading rules file: /usr/lib/udev/rules.d/70-camera.rules Reading rules file: /usr/lib/udev/rules.d/70-joystick.rules Reading rules file: /usr/lib/udev/rules.d/70-memory.rules Reading rules file: /usr/lib/udev/rules.d/70-mouse.rules Reading rules file: /usr/lib/udev/rules.d/70-power-switch.rules Reading rules file: /usr/lib/udev/rules.d/70-printers.rules Reading rules file: /etc/udev/rules.d/70-snap.firefox.rules Reading rules file: /etc/udev/rules.d/70-snap.snapd.rules Reading rules file: /usr/lib/udev/rules.d/70-spice-vdagentd.rules Reading rules file: /usr/lib/udev/rules.d/70-touchpad.rules Reading rules file: /usr/lib/udev/rules.d/70-uaccess.rules Reading rules file: /usr/lib/udev/rules.d/71-ipp-usb.rules Reading rules file: /usr/lib/udev/rules.d/71-power-switch-proliant.rules Reading rules file: /usr/lib/udev/rules.d/71-seat.rules Reading rules file: /usr/lib/udev/rules.d/71-u-d-c-gpu-detection.rules Reading rules file: /usr/lib/udev/rules.d/73-seat-late.rules Reading rules file: /usr/lib/udev/rules.d/73-special-net-names.rules Reading rules file: /usr/lib/udev/rules.d/75-net-description.rules Reading rules file: /usr/lib/udev/rules.d/75-probe_mtd.rules Reading rules file: /usr/lib/udev/rules.d/77-mm-broadmobi-port-types.rules Reading rules file: /usr/lib/udev/rules.d/77-mm-cinterion-port-types.rules Reading rules file: /usr/lib/udev/rules.d/77-mm-dell-port-types.rules Reading rules file: /usr/lib/udev/rules.d/77-mm-dlink-port-types.rules Reading rules file: /usr/lib/udev/rules.d/77-mm-ericsson-mbm.rules Reading rules file: /usr/lib/udev/rules.d/77-mm-fibocom-port-types.rules Reading rules file: /usr/lib/udev/rules.d/77-mm-foxconn-port-types.rules Reading rules file: /usr/lib/udev/rules.d/77-mm-gosuncn-port-types.rules Reading rules file: /usr/lib/udev/rules.d/77-mm-haier-port-types.rules Reading rules file: /usr/lib/udev/rules.d/77-mm-huawei-net-port-types.rules Reading rules file: /usr/lib/udev/rules.d/77-mm-linktop-port-types.rules Reading rules file: /usr/lib/udev/rules.d/77-mm-longcheer-port-types.rules Reading rules file: /usr/lib/udev/rules.d/77-mm-mtk-port-types.rules Reading rules file: /usr/lib/udev/rules.d/77-mm-nokia-port-types.rules Reading rules file: /usr/lib/udev/rules.d/77-mm-qcom-soc.rules Reading rules file: /usr/lib/udev/rules.d/77-mm-qdl-device-blacklist.rules Reading rules file: /usr/lib/udev/rules.d/77-mm-quectel-port-types.rules Reading rules file: /usr/lib/udev/rules.d/77-mm-sierra.rules Reading rules file: /usr/lib/udev/rules.d/77-mm-simtech-port-types.rules Reading rules file: /usr/lib/udev/rules.d/77-mm-telit-port-types.rules Reading rules file: /usr/lib/udev/rules.d/77-mm-tplink-port-types.rules Reading rules file: /usr/lib/udev/rules.d/77-mm-ublox-port-types.rules Reading rules file: /usr/lib/udev/rules.d/77-mm-x22x-port-types.rules Reading rules file: /usr/lib/udev/rules.d/77-mm-zte-port-types.rules Reading rules file: /usr/lib/udev/rules.d/78-graphics-card.rules Reading rules file: /usr/lib/udev/rules.d/78-sound-card.rules Reading rules file: /usr/lib/udev/rules.d/80-debian-compat.rules Reading rules file: /usr/lib/udev/rules.d/80-drivers.rules Reading rules file: /usr/lib/udev/rules.d/80-libinput-device-groups.rules Reading rules file: /usr/lib/udev/rules.d/80-mm-candidate.rules Reading rules file: /usr/lib/udev/rules.d/80-net-setup-link.rules Reading rules file: /usr/lib/udev/rules.d/80-udisks2.rules Reading rules file: /usr/lib/udev/rules.d/81-net-dhcp.rules Reading rules file: /usr/lib/udev/rules.d/84-nm-drivers.rules Reading rules file: /usr/lib/udev/rules.d/85-brltty.rules Reading rules file: /usr/lib/udev/rules.d/85-hdparm.rules Reading rules file: /usr/lib/udev/rules.d/85-hplj10xx.rules Reading rules file: /usr/lib/udev/rules.d/85-nm-unmanaged.rules Reading rules file: /usr/lib/udev/rules.d/90-alsa-restore.rules Reading rules file: /usr/lib/udev/rules.d/90-bolt.rules Reading rules file: /usr/lib/udev/rules.d/90-console-setup.rules Reading rules file: /etc/udev/rules.d/90-disable-ens32.rules Reading rules file: /usr/lib/udev/rules.d/90-fwupd-devices.rules Reading rules file: /usr/lib/udev/rules.d/90-libgpod.rules Reading rules file: /usr/lib/udev/rules.d/90-libinput-fuzz-override.rules Reading rules file: /run/udev/rules.d/90-netplan.rules Reading rules file: /usr/lib/udev/rules.d/90-nm-thunderbolt.rules Reading rules file: /usr/lib/udev/rules.d/90-pipewire-alsa.rules Reading rules file: /usr/lib/udev/rules.d/90-pulseaudio.rules Reading rules file: /usr/lib/udev/rules.d/95-cd-devices.rules Reading rules file: /usr/lib/udev/rules.d/95-dm-notify.rules Reading rules file: /usr/lib/udev/rules.d/95-upower-hid.rules Reading rules file: /usr/lib/udev/rules.d/95-upower-wup.rules Reading rules file: /usr/lib/udev/rules.d/96-e2scrub.rules Reading rules file: /usr/lib/udev/rules.d/97-hid2hci.rules Reading rules file: /etc/udev/rules.d/99-hdd-smart-dump-on-usb-trigger.udev.rules Reading rules file: /usr/lib/udev/rules.d/99-libsane1.rules Reading rules file: /usr/lib/udev/rules.d/99-systemd.rules sd-device: Failed to pursuit symlinks successful "/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/net/ens32". value '[dmi/id]sys_vendor' is 'Maxtone' value '[dmi/id]sys_vendor' is 'Maxtone' ens32: /usr/lib/udev/rules.d/75-net-description.rules:6 Importing properties from results of builtin bid 'net_id' ens32: MAC reside identifier: hw_addr=00:25:11:c8:3c:e7 → x002511c83ce7 sd-device: Failed to pursuit symlinks successful "/sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/of_node". sd-device: Failed to pursuit symlinks successful "/sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/physfn". ens32: Parsing slot accusation from PCI instrumentality sysname "0000:01:00.0": success ens32: dev_port=0 ens32: PCI way identifier: domain=0 bus=1 slot=0 func=0 phys_port= dev_port=0 → p1s0 ens32: Slot identifier: domain=0 slot=32 func=0 phys_port= dev_port=0 → s32 ens32: /usr/lib/udev/rules.d/75-net-description.rules:12 Importing properties from results of builtin bid 'hwdb --subsystem=pci' ens32: hwdb modalias key: "pci:v00001969d00002048sv00001019sd00002048bc02sc00i00" ens32: /usr/lib/udev/rules.d/80-net-setup-link.rules:5 Importing properties from results of builtin bid 'path_id' ens32: /usr/lib/udev/rules.d/80-net-setup-link.rules:9 Importing properties from results of builtin bid 'net_setup_link' ens32: Device has name_assign_type=4 ens32: Device has addr_assign_type=0 ens32: Config record /usr/lib/systemd/network/99-default.link is applied ens32: MAC reside connected nan instrumentality already matches argumentation "persistent". ens32: Policy *keep*: keeping existing userspace name ens32: /usr/lib/udev/rules.d/80-net-setup-link.rules:11 NAME 'ens32' ens32: /etc/udev/rules.d/90-disable-ens32.rules:1 RUN '/etc/udev/remove_onboard_ens32.sh $env{DEVPATH}' ens32: /usr/lib/udev/rules.d/99-systemd.rules:66 RUN '/lib/systemd/systemd-sysctl --prefix=/net/ipv4/conf/$name --prefix=/net/ipv4/neigh/$name --prefix=/net/ipv6/conf/$name --prefix=/net/ipv6/neigh/$name' ens32: Failed to update tags nether /run/udev/tag/: Permission denied DEVPATH=/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/net/ens32 INTERFACE=ens32 IFINDEX=2 ACTION=add SUBSYSTEM=net TAGS=:systemd: ID_MM_CANDIDATE=1 ID_NET_NAMING_SCHEME=v253 ID_NET_NAME_MAC=enx002511c83ce7 ID_OUI_FROM_DATABASE=Elitegroup Computer Systems Co.,Ltd. ID_NET_NAME_PATH=enp1s0 ID_NET_NAME_SLOT=ens32 ID_BUS=pci ID_VENDOR_ID=0x1969 ID_MODEL_ID=0x2048 ID_PCI_CLASS_FROM_DATABASE=Network controller ID_PCI_SUBCLASS_FROM_DATABASE=Ethernet controller ID_VENDOR_FROM_DATABASE=Qualcomm Atheros ID_MODEL_FROM_DATABASE=Attansic L2 Fast Ethernet ID_PATH=pci-0000:01:00.0 ID_PATH_TAG=pci-0000_01_00_0 ID_NET_DRIVER=atl2 ID_NET_LINK_FILE=/usr/lib/systemd/network/99-default.link ID_NET_NAME=ens32 CURRENT_TAGS=:systemd: SYSTEMD_ALIAS=/sys/subsystem/net/devices/ens32 USEC_INITIALIZED=1300330 run: '/etc/udev/remove_onboard_ens32.sh /devices/pci0000:00/0000:00:1c.0/0000:01:00.0/net/ens32' run: '/lib/systemd/systemd-sysctl --prefix=/net/ipv4/conf/ens32 --prefix=/net/ipv4/neigh/ens32 --prefix=/net/ipv6/conf/ens32 --prefix=/net/ipv6/neigh/ens32' Unload kernel module index. Unloaded nexus configuration context.

I'm trying to fig retired wherever I'm making nan mistake. Can personification please fig retired where?

More
close