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
0cb1e03a
Commit
0cb1e03a
authored
May 25, 2010
by
Leigh B Stoller
Browse files
Merge branch 'master' of git-public.flux.utah.edu:/flux/git/emulab-devel
parents
a7ce54b2
3533283b
Changes
3
Hide whitespace changes
Inline
Side-by-side
tbsetup/ptopgen.in
View file @
0cb1e03a
...
...
@@ -407,7 +407,7 @@ if (defined($pid)) {
# 1) To avoid an explosion in the number of features for nodes
# 2) To avoid information leaks, allowing projects to see each other's images
#
my
$osidquery
=
"
select distinct o.osid, oi.type, o.osname, o.pid, o.OS, o.version, o.description from os_info as o
"
.
my
$osidquery
=
"
select distinct o.osid, oi.type, o.osname, o.pid, o.OS, o.version, o.description
,o.protogeni_export
from os_info as o
"
.
"
left join osidtoimageid as oi on o.osid = oi.osid
"
.
"
left join images as i on oi.imageid = i.imageid
"
.
"
where i.global = 1
";
...
...
@@ -447,14 +447,18 @@ my %node_latitudes;
my
%node_longitudes
;
$result
=
DBQueryFatal
(
$osidquery
);
while
(
my
(
$osid
,
$type
,
$osname
,
$ospid
,
$osos
,
$osversion
,
$osdescription
)
=
$result
->
fetchrow
())
{
$osversion
,
$osdescription
,
$geni
)
=
$result
->
fetchrow
())
{
if
(
$typemap
{
$type
})
{
push
(
@
{
$typemap
{
$type
}
->
{'
OSLIST
'}
},
$osid
);
$osid_name
{
$osid
}
=
$osname
;
$osid_pid
{
$osid
}
=
$ospid
;
$osid_os
{
$osid
}
=
$osos
;
$osid_version
{
$osid
}
=
$osversion
;
$osid_description
{
$osid
}
=
$osdescription
;
my
$default
=
$typemap
{
$type
}
->
{'
OSID
'};
if
(
$geni
eq
1
||
(
defined
(
$default
)
&&
$default
eq
$osid
))
{
push
(
@
{
$typemap
{
$type
}
->
{'
OSLIST
'}
},
$osid
);
$osid_name
{
$osid
}
=
$osname
;
$osid_pid
{
$osid
}
=
$ospid
;
$osid_os
{
$osid
}
=
$osos
;
$osid_version
{
$osid
}
=
$osversion
;
$osid_description
{
$osid
}
=
$osdescription
;
}
}
if
(
$node_type_osids
{
$type
})
{
push
@
{
$node_type_osids
{
$type
}},
$osid
;
...
...
tmcd/common/libsetup.pm
View file @
0cb1e03a
...
...
@@ -1077,50 +1077,52 @@ sub gendhcpdconf($$)
my
$singlenet
=
$$row
{"
SINGLENET
"};
my
$inner_elab_boot
=
$$row
{"
INNER_ELAB_BOOT
"};
my
$plab_boot
=
$$row
{"
PLAB_BOOT
"};
my
$booting
;
my
$dns
;
if
(
defined
$hostname
)
{
$hostname
=
if
(
defined
$hostname
)
{
$hostname
=
"
${spaces}
\t
option host-name
\"
$hostname
\"
;
\n
";
}
}
if
(
defined
$filename
)
{
if
(
defined
$filename
)
{
$filename
=~
s/^"(.*)"$/$1/
;
$filename
=
"
${spaces}
\t
filename
\"
$filename
\"
;
\n
";
}
}
if
(
defined
$next_server
)
{
if
(
defined
$next_server
)
{
$next_server
=
"
${spaces}
\t
next-server
"
.
$next_server
.
"
;
\n
";
}
}
if
(
defined
$bootinfo_server
)
{
if
(
defined
$bootinfo_server
)
{
$bootinfo_server
=
"
${spaces}
\t
option
"
.
"
PXE.emulab-bootinfo
"
.
$bootinfo_server
.
"
;
\n
";
}
}
if
(
$inner_elab_boot
)
{
if
(
$inner_elab_boot
)
{
if
(
$singlenet
)
{
$booting
=
"
${spaces}
\t
ignore booting;
\n
";
}
else
{
$dns
=
"
${spaces}
\t
option
"
.
"
domain-name-servers 1.1.1.1;
\n
";
}
}
#
# Handle alternate boot program filename if it exists.
# Use mutable nodes.pxe_boot_path if it is defined.
# Otherwise use the node_types.pxe_boot_path if it is
# defined. Otherwise don't set anything (use the global
# default).
#
if
(
defined
$filename
)
{
# make sure it is pretty constrained
if
(
$filename
=~
/^\/tftpboot\//
&&
$fn
!~
/\.\./
)
{
$filename
=
"
${spaces}
\t
filename
\"
$filename
\"
;
\n
";
}
#
# Handle alternate boot program filename if it exists.
# Use mutable nodes.pxe_boot_path if it is defined.
# Otherwise use the node_types.pxe_boot_path if it is
# defined. Otherwise don't set anything (use the global
# default).
#
if
(
defined
$filename
)
{
# make sure it is pretty constrained
if
(
$filename
=~
/^\/tftpboot\//
&&
$fn
!~
/\.\./
)
{
$filename
=
"
${spaces}
\t
filename
\"
$filename
\"
;
\n
";
}
}
# Need to make MAC look right..
...
...
tmcd/tmcd.c
View file @
0cb1e03a
...
...
@@ -7972,7 +7972,7 @@ COMMAND_PROTOTYPE(dodhcpdconf)
}
if
(
inner_elab_boot
)
{
res2
=
mydb_query
(
"select elabinelab_singlenet from experiments "
res2
=
mydb_query
(
"select elabinelab_singlenet from experiments
where
"
"eid = '%s' and pid = '%s'"
,
1
,
row
[
5
],
row
[
6
]);
if
(
!
res2
)
{
...
...
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