Skip to content
GitLab
Menu
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
41412a58
Commit
41412a58
authored
May 22, 2012
by
Leigh B Stoller
Browse files
Insert the default_osid node_type_attributes when creating the type.
parent
fc5354e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils/addspecialdevice.in
View file @
41412a58
...
...
@@ -151,6 +151,7 @@ exit(0);
sub
CreateType
($$)
{
my
(
$type
,
$isvirt
)
=
@_
;
my
$osid
=
(
$isvirt
?
$osinfo_vm
->
osid
()
:
$osinfo
->
osid
());
#
# Defaults work for almost everything.
...
...
@@ -171,6 +172,8 @@ sub CreateType($$)
if
(
$debug
||
$impotent
)
{
print
"
Adding false attributes rebootable/imageable
\n
";
print
"
Adding true attribute fakenode
\n
";
print
"
Setting default osid:
"
.
(
$isvirt
?
$osinfo_vm
->
osname
()
:
$osinfo
->
osname
())
.
"
\n
";
}
if
(
!
$impotent
)
{
DBQueryFatal
("
replace into node_type_attributes values
"
.
...
...
@@ -179,6 +182,8 @@ sub CreateType($$)
"
('
$type
','imageable','0','boolean')
");
DBQueryFatal
("
replace into node_type_attributes values
"
.
"
('
$type
','fakenode','1','boolean')
");
DBQueryFatal
("
replace into node_type_attributes values
"
.
"
('
$type
','default_osid','
$osid
','integer')
");
}
return
0
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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