From c762f61e27673cf6abefbfee0cb900e7555a16bf Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sat, 14 Mar 2009 18:58:12 +0000 Subject: [PATCH] Include per-interface routes in backup --- net/redhat-linux-lib.pl | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/net/redhat-linux-lib.pl b/net/redhat-linux-lib.pl index aaa2d9f14..c41b9bb4b 100644 --- a/net/redhat-linux-lib.pl +++ b/net/redhat-linux-lib.pl @@ -268,15 +268,16 @@ if (!$supports_dev_routes) { push(@rv, $static_route_config); } else { - local $f; - opendir(DIR, &translate_filename($devices_dir)); - while($f = readdir(DIR)) { - if ($f =~ /^([a-z]+\d*(\.\d+)?(:\d+)?)\.route$/ || - $f =~ /^route\-([a-z]+\d*(\.\d+)?(:\d+)?)$/) { - push(@rv, "$devices_dir/$f"); + foreach my $dir ($devices_dir, $net_scripts_dir) { + opendir(DIR, &translate_filename($dir)); + while(my $f = readdir(DIR)) { + if ($f =~ /^([a-z]+\d*(\.\d+)?(:\d+)?)\.route$/ || + $f =~ /^route\-([a-z]+\d*(\.\d+)?(:\d+)?)$/) { + push(@rv, "$dir/$f"); + } } + closedir(DIR); } - closedir(DIR); } return @rv; }