Mark Hills wrote in <4323c58e-9e40-4e02-5df3-358db74e1...@xwax.org>: |Alpine Linux documentation [1] explains using busybox 'nameif' to rename |ethernet devices. | |But it appears 'mdev' doesn't invoke the command: | | $ mdev -s -v 2>&1 | grep nameif | [nothing] | |/etc/mdev.conf looks like: | | -SUBSYSTEM=net;DEVPATH=.*/net/.*;.* root:root 0600 @/sbin/nameif -s | |Note the change to 0600 octal, just in case. We also tried increasingly |less-specific matches, without success: | | SUBSYTEM=net;.* | net/.* | net/(.*) | |Using ".*" does actually work. So it proves it is capable (using correct |config etc.) but of course invokes the command excessively: | | # mdev -s -v 2>&1 | grep nameif | mdev: running: /sbin/nameif -s | mdev: running: /sbin/nameif -s | mdev: running: /sbin/nameif -s | [...] | |Is this a busybox bug, or have I been misled by the Alpine docs? What is |the correct match? | |I found only very little information on mdev.conf, just the brief message |in the "--help" message, please let me know if there is more somewhere.
busybox: git show master:docs/mdev.txt git show master:examples/mdev.conf I personally have my own little shitty scripted EFI-stub based boot system, and that does xbase_mounts() { # {{{ $1=$BB [uses $MDEV_RUN; calls stty -isig] echo '. Checking /{dev,sys,proc,run}' xhavemnt $1 dev || $1 mount -n -t devtmpfs -o mode=0755,exec,nosuid,noatime none dev xhavemnt $1 sys || $1 mount -n -t sysfs none sys xhavemnt $1 proc || $1 mount -n -t proc none proc xhavemnt $1 run || $1 mount -n -t tmpfs -o mode=0755,noexec,nosuid,nodev none run #[ -e /sys/firmware/efi ] && #mount -t efivarfs efivarfs /sys/firmware/efi/efivars -o nosuid,nodev,noexec $1 stty -isig if [ -n "$MDEV_RUN" ]; then echo '. About to run mdev -s, waiting for some more settlement' $1 sleep 8 $1 mdev -s $MDEV_RUN fi } But effectively i do not use it here; and never used it for network stuff. (I only use it to populate a /dev/disk/by-uuid.) It is all trial and error anyway i'd guess. |Many thanks, | |[1] https://wiki.alpinelinux.org/wiki/Custom_network_interface_names | |-- |Mark |_______________________________________________ |busybox mailing list |busybox@busybox.net |https://lists.busybox.net/mailman/listinfo/busybox --End of <4323c58e-9e40-4e02-5df3-358db74e1...@xwax.org> --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) | |And in Fall, feel "The Dropbear Bard"s ball(s). | |The banded bear |without a care, |Banged on himself fore'er and e'er | |Farewell, dear collar bear _______________________________________________ busybox mailing list busybox@busybox.net https://lists.busybox.net/mailman/listinfo/busybox