summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBob Gilligan <gilligan@vyatta.com>2008-10-13 10:34:31 -0700
committerBob Gilligan <gilligan@vyatta.com>2008-10-13 10:34:31 -0700
commitecfe5f021009f6f50c34500b8e9fdeaeedbf7fd4 (patch)
tree628f0d96d9b1a5384605ec4184abc7bb20f488e1 /scripts
parent52bbcd4483e25d282e92e5181d75b2d526352d13 (diff)
downloadvyatta-cfg-system-ecfe5f021009f6f50c34500b8e9fdeaeedbf7fd4.tar.gz
vyatta-cfg-system-ecfe5f021009f6f50c34500b8e9fdeaeedbf7fd4.zip
Bugfix: 3226
Handle case where udev state file doesn't exist.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vyatta_net_name4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/vyatta_net_name b/scripts/vyatta_net_name
index 1d90d9f3..ff8b9bf5 100755
--- a/scripts/vyatta_net_name
+++ b/scripts/vyatta_net_name
@@ -111,7 +111,9 @@ finish ()
# config file, if it exists, so it doesn't rename the interface
# out from under us. Remove the subject line plus the comment
# line above it
- sed -i -e "/^#/N;/${address}/d" $udev_persistent_net_rules_file
+ if [ -e $udev_persistent_net_rules_file ]; then
+ sed -i -e "/^#/N;/${address}/d" $udev_persistent_net_rules_file
+ fi
exit $?
}