Commit dc6d42e3 authored by Mike Hibler's avatar Mike Hibler
Browse files

Create a "null" rc.route file if no routing is used,

rc.ifc uses it unconditionally so it needs to exist.
parent 554bde3e
......@@ -689,7 +689,8 @@ sub dorouterconfig ()
}
#
# Look for router type. If none, then do not bother to write this file.
# Look for router type. If none, we still write the file since other
# scripts expect this to exist.
#
foreach my $line (@stuff) {
if (($line =~ /ROUTERTYPE=(.+)/) && ($1 ne "none")) {
......@@ -697,9 +698,6 @@ sub dorouterconfig ()
last;
}
}
if (! $routing) {
return 0;
}
open(RC, ">" . TMROUTECONFIG)
or die("Could not open " . TMROUTECONFIG . ": $!");
......@@ -707,6 +705,13 @@ sub dorouterconfig ()
print RC "#!/bin/sh\n";
print RC "# auto-generated by libsetup.pm, DO NOT EDIT\n";
if (! $routing) {
print RC "true\n";
close(RC);
chmod(0755, TMROUTECONFIG);
return 0;
}
#
# Now convert static route info into OS route commands
# Also check for use of gated and remember it.
......
......@@ -689,7 +689,8 @@ sub dorouterconfig ()
}
#
# Look for router type. If none, then do not bother to write this file.
# Look for router type. If none, we still write the file since other
# scripts expect this to exist.
#
foreach my $line (@stuff) {
if (($line =~ /ROUTERTYPE=(.+)/) && ($1 ne "none")) {
......@@ -697,9 +698,6 @@ sub dorouterconfig ()
last;
}
}
if (! $routing) {
return 0;
}
open(RC, ">" . TMROUTECONFIG)
or die("Could not open " . TMROUTECONFIG . ": $!");
......@@ -707,6 +705,13 @@ sub dorouterconfig ()
print RC "#!/bin/sh\n";
print RC "# auto-generated by libsetup.pm, DO NOT EDIT\n";
if (! $routing) {
print RC "true\n";
close(RC);
chmod(0755, TMROUTECONFIG);
return 0;
}
#
# Now convert static route info into OS route commands
# Also check for use of gated and remember it.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment