Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
ac38519e
Commit
ac38519e
authored
Oct 07, 2014
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add -r option to turn "shared" (within project) flag.
parent
3b79ad98
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
utils/clone_image.in
utils/clone_image.in
+12
-3
No files found.
utils/clone_image.in
View file @
ac38519e
...
...
@@ -50,13 +50,14 @@ sub usage()
"
-d Turn on debug mode
\n
"
.
"
-e Create a whole disk image
\n
"
.
"
-g 0,1 Override base image global setting
\n
"
.
"
-r 0,1 Override base image shared (within project) setting
\n
"
.
"
-s Create descriptor but do not snapshot
\n
"
.
"
-n Impotent mode
\n
"
.
"
-F Create a full image even if deltas are on
\n
"
.
"
-w Wait for image to be created
\n
");
exit
(
-
1
);
}
my
$optlist
=
"
densg:wF
";
my
$optlist
=
"
densg:wF
r
";
my
$debug
=
0
;
my
$wholedisk
=
0
;
my
$impotent
=
0
;
...
...
@@ -65,6 +66,7 @@ my $isvirtnode = 0;
my
$waitmode
=
0
;
my
$nodelta
=
0
;
# To pass to create_image.
my
$global
;
my
$shared
;
#
# Configure variables
...
...
@@ -133,6 +135,9 @@ if (defined($options{"F"})) {
if
(
defined
(
$options
{"
g
"}))
{
$global
=
$options
{"
g
"};
}
elsif
(
defined
(
$options
{"
r
"}))
{
$shared
=
$options
{"
r
"};
}
usage
()
if
(
@ARGV
!=
2
);
...
...
@@ -400,8 +405,12 @@ $xmlfields{"reboot_waittime"} = $base_osinfo->reboot_waittime()
$xmlfields
{"
osfeatures
"}
=
$base_osinfo
->
osfeatures
()
if
(
defined
(
$base_osinfo
->
osfeatures
())
&&
$base_osinfo
->
osfeatures
()
ne
"");
$xmlfields
{"
global
"}
=
1
if
(
defined
(
$global
)
&&
$global
);
if
(
defined
(
$global
)
&&
$global
)
{
$xmlfields
{"
global
"}
=
1
;
}
elsif
(
defined
(
$shared
)
&&
$shared
)
{
$xmlfields
{"
shared
"}
=
1
;
}
if
(
defined
(
$base_image
))
{
$xmlfields
{"
mbr_version
"}
=
$base_image
->
mbr_version
();
...
...
Write
Preview
Markdown
is supported
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