Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
dc6d42e3
Commit
dc6d42e3
authored
Sep 12, 2002
by
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
tmcd/common/libsetup.pm
View file @
dc6d42e3
...
...
@@ -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.
...
...
tmcd/libsetup.pm
View file @
dc6d42e3
...
...
@@ -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.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment