summaryrefslogtreecommitdiff
path: root/scripts/add_bootfile_eth_hwid
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-10-21 16:57:16 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-10-26 14:06:00 -0700
commit4a92157b9e077514fdbf5845169323ed7370bedb (patch)
tree404806994809509f52b2f39fc67975900c24b42a /scripts/add_bootfile_eth_hwid
parent28abf7773e5fc6c26725340e19dade4166d930cd (diff)
downloadvyatta-cfg-quagga-4a92157b9e077514fdbf5845169323ed7370bedb.tar.gz
vyatta-cfg-quagga-4a92157b9e077514fdbf5845169323ed7370bedb.zip
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.
Diffstat (limited to 'scripts/add_bootfile_eth_hwid')
-rwxr-xr-xscripts/add_bootfile_eth_hwid29
1 files changed, 0 insertions, 29 deletions
diff --git a/scripts/add_bootfile_eth_hwid b/scripts/add_bootfile_eth_hwid
deleted file mode 100755
index 61deea56..00000000
--- a/scripts/add_bootfile_eth_hwid
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/bash
-
-# add ethnet interface sub-block to configure file
-
-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 {$/,/^}$/ {
- /^}$/i\
- ethernet '"$eth"' {\
- hw-id '"$hwid"'\
- }
- }' $bootfile