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

Re: How to remove 70-persistent-net.rules?



Cyril Jaquier <cyril.jaquier@jaqpot.net> (02/04/2009):
> 1/ Is there a configuration parameter to disable this in udev?

Yes, kill (remove) 75-persistent-net-generator.rules when building your
LiveCD.

> 2/ Should I write a script that remove this file during bootup? Is
> scripts/live-bottom/ the right place to do it? Probably before
> 23networking?

I do that at build-time. For reference, I'm using this script:
| #!/bin/sh -e
| # Copyright © 2008 Cyril Brulebois / Kerlabs
| # <cyril.brulebois@kerlabs.com>
| 
| # Since udev may remember the different interfaces on every node, one
| # can then notice the use of eth0, eth1, eth2, etc., which will break
| # the initramfs. To work around this, it's been chosen to disable the
| # following udev rule file, so that there's no net device persistence.
| NASTY_SCRIPT_PATTERN='*persistent-net-generator.rules'
| UDEV_DIR=/etc/udev
| 
| # Previously, an rm call was used, but since the script got moved to
| # its own symlink under /etc/udev/rules.d, it's been chosen to use a
| # find call instead, removing the script and its symlinks, both in the
| # old and new udev cases.
| #
| # For reference, the upload which introduced this move is 0.124-1
| find $UDEV_DIR -name $NASTY_SCRIPT_PATTERN -delete

Given it's trivial, you can consider it “released” under those terms:
http://sam.zoy.org/wtfpl/

Cheers,
-- 
Cyril Brulebois

Attachment: signature.asc
Description: Digital signature


Reply to: