Tag Info

New answers tagged

1

Is nameif deprecated? is it ok to continue to use nameif? Yes. Yes, it is. Just that there are more reliable methods to set the MAC of an interface, like using udev rules. If so is there an equivalent replacement? As mentioned before, you could use specials udev rules to set the MAC address however you like. In my case, the NIC's on my ...


0

You could try to use := instead of += in the rules RUN assignments. The := operator sets the list value and disallows further changes.


4

Not sure what you mean. mknod foo b 8 0 Will create the device file called foo as a block device with major 8 and minor 0. If you mean to find one or any of the files in /dev that have the same type, major and minor, you can do (with zsh): For block device 8:0: $ zmodload zsh/stat $ ls -ld /dev/**/*(-D%be:'zstat -H s $REPLY && (($s[rdev] == ...


3

I found a simpler approach using the sys pseudofilesystem, at /sys/dev you have the devices ordered by type an then by major/minor, the file uevent contains the device name and a bunch of other info. So for example, for file in $(find /sys/dev/ -name 7:0); do source ${file}/uevent; echo $DEVNAME; done; Echoes, loop0 vcs Note: This was ...


3

Apparently it can be done more simply with udevadm, and I've just found out how. To get the DEVNAME from udevadm you need only do: udevadm info -rq name $PATH For instance, if you wanted to know the /dev name for /sys/dev/char/5:1 you'd do: udevadm info -rq name /sys/dev/char/5:1 OUTPUT /dev/console The -r option is to specify a --rooted path - ...


0

You need an 'S' at the end of ATTR in ATTR{vendor} and ATTR{label}, and at the end of SUBSYSTEM. An easy mistake to make, I just got burnt myself.


0

It turns out the issue is that systemd ignores everything inside /dev/block. The /dev/block/ec2/ephemeral0 was a symlink created by a udev rule, so the solution is to simply adjust the udev rule and put the symlink somewhere else. I chose to place it at /dev/disk/ec2/ephemeral0 instead. $ udevadm info -q symlink -n /dev/xvdb ...


2

I assume you're talking about sid or jessie. For wheezy you may want to try the backport of v204. There may be some misconceptions in play here: as can be seen from the udev rules here (for v208 currently in sid), the udev developers explicitly chose the kernel cmdline as the default way of enabling this functionality. I don't see anything inherently ...


1

According to the udev manpage (man 7 udev), there are two distinct forms of the attribute match: ATTR{filename} Match sysfs attribute values of the event device. Trailing whitespace in the attribute values is ignored unless the specified match value itself contains trailing whitespace. and ATTRS{filename} Search the ...



Top 50 recent answers are included