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
010dc9a8
Commit
010dc9a8
authored
Feb 10, 2015
by
Kirk Webb
Browse files
Compensate for Linux environments that use wacky paths for the boot device.
parent
9a6d3969
Changes
1
Hide whitespace changes
Inline
Side-by-side
clientside/tmcc/linux/liblocstorage.pm
View file @
010dc9a8
...
...
@@ -38,6 +38,7 @@ sub VERSION() { return 1.0; }
# Must come after package declaration!
use
English
;
use
Cwd
'
abs_path
';
# Load up the paths. Its conditionalized to be compatabile with older images.
# Note this file has probably already been loaded by the caller.
...
...
@@ -222,9 +223,13 @@ sub get_bootdisk()
my
$disk
=
undef
;
my
$line
=
`
$MOUNT
| grep ' on / '
`;
if
(
$line
&&
$line
=~
/^\/dev\/(\S+)\d+ on \//
)
{
$disk
=
$
1
;
if
(
$line
&&
$line
=~
qr{^(/dev/\S+) on /}
)
{
my
$device
=
abs_path
(
$
1
);
if
(
$device
&&
$device
=~
qr{^/dev/(\S+)\d+}
)
{
$disk
=
$
1
;
}
}
return
$disk
;
}
...
...
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