From ecfe5f021009f6f50c34500b8e9fdeaeedbf7fd4 Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Mon, 13 Oct 2008 10:34:31 -0700 Subject: Bugfix: 3226 Handle case where udev state file doesn't exist. --- scripts/vyatta_net_name | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 $? } -- cgit v1.2.3