From 4a92157b9e077514fdbf5845169323ed7370bedb Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 21 Oct 2010 16:57:16 -0700 Subject: Change vyatta_net_name into a perl script Use existing config parser and perl to handle udev device naming. Do renaming early in udev boot, and fixup config file later. This avoids rescanning udev devices on boot and adds preliminary support for hotplug. --- scripts/mod_bootfile_eth_hwid | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100755 scripts/mod_bootfile_eth_hwid (limited to 'scripts/mod_bootfile_eth_hwid') diff --git a/scripts/mod_bootfile_eth_hwid b/scripts/mod_bootfile_eth_hwid deleted file mode 100755 index feab64f1..00000000 --- a/scripts/mod_bootfile_eth_hwid +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -# modify interface sub-block - -shopt -s extglob - -if [[ "$*" == *--help* ]] ; then - echo ${0##*/} [test_]FILE INTERFACE HWID - exit 0 -fi - -if [[ "$1" == test_* ]] ; then - origfile=$1 - bootfile=/tmp/${1##*/}_$$ - cp $origfile $bootfile - trap "diff -c $origfile $bootfile; rm -f $bootfile; exit 0" $? -else - origfile= - bootfile=$1 -fi -eth=$2 -hwid=$3 - -sed -i '/^interfaces {$/,/^}$/ { - /^ ethernet '"$eth"' {$/ { - :join - /\n }$/ { - /hw-id:\? / s/\(hw-id\):\? [0-9a-fA-F:]\+/\1 '"$hwid"'/ - /hw-id:\? /! s/}$/ hw-id '"$hwid"'\n }/ - b - } - N - b join - } -}' $bootfile - -- cgit v1.2.3