Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
af81df02
Commit
af81df02
authored
Mar 01, 2012
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 101: use run_command to avoid locale errors
parent
bb95ab1d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
32 deletions
+43
-32
VZDump.pm
PVE/VZDump.pm
+36
-31
changelog.Debian
debian/changelog.Debian
+6
-0
defines.mk
defines.mk
+1
-1
No files found.
PVE/VZDump.pm
View file @
af81df02
...
...
@@ -516,22 +516,25 @@ sub get_lvm_mapping {
my
$devmapper
;
my
$cmd
=
"
lvs --units m --separator ':' --noheadings -o vg_name,lv_name,lv_size
";
if
(
my
$fd
=
IO::
File
->
new
("
$cmd
2>/dev/null|
"))
{
while
(
my
$line
=
<
$fd
>
)
{
if
(
$line
=~
m|^\s*(\S+):(\S+):(\d+(\.\d+))[Mm]$|
)
{
my
$vg
=
$1
;
my
$lv
=
$2
;
$devmapper
->
{"
/dev/
$vg
/
$lv
"}
=
[
$vg
,
$lv
];
my
$qlv
=
$lv
;
$qlv
=~
s/-/--/g
;
my
$qvg
=
$vg
;
$qvg
=~
s/-/--/g
;
$devmapper
->
{"
/dev/mapper/
$qvg
-
$qlv
"}
=
[
$vg
,
$lv
];
}
}
close
(
$fd
);
}
my
$cmd
=
['
lvs
',
'
--units
',
'
m
',
'
--separator
',
'
:
',
'
--noheadings
',
'
-o
',
'
vg_name,lv_name,lv_size
'
];
my
$parser
=
sub
{
my
$line
=
shift
;
if
(
$line
=~
m|^\s*(\S+):(\S+):(\d+(\.\d+))[Mm]$|
)
{
my
$vg
=
$1
;
my
$lv
=
$2
;
$devmapper
->
{"
/dev/
$vg
/
$lv
"}
=
[
$vg
,
$lv
];
my
$qlv
=
$lv
;
$qlv
=~
s/-/--/g
;
my
$qvg
=
$vg
;
$qvg
=~
s/-/--/g
;
$devmapper
->
{"
/dev/mapper/
$qvg
-
$qlv
"}
=
[
$vg
,
$lv
];
}
};
eval
{
PVE::Tools::
run_command
(
$cmd
,
errfunc
=>
sub
{},
outfunc
=>
$parser
);
};
warn
$@
if
$@
;
return
$devmapper
;
}
...
...
@@ -539,24 +542,26 @@ sub get_lvm_mapping {
sub
get_mount_info
{
my
(
$dir
)
=
@_
;
my
$out
;
if
(
my
$fd
=
IO::
File
->
new
("
df -P -T '
$dir
' 2>/dev/null|
"))
{
<
$fd
>
;
#skip first line
$out
=
<
$fd
>
;
close
(
$fd
);
}
my
$cmd
=
[
'
df
',
'
-P
',
'
-T
',
'
-B
',
'
1
',
$dir
];
return
undef
if
!
$out
;
my
@res
=
$out
=~
m/^(\S+)\s+(\S+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)%\s+(.*)$/
;
my
$res
;
return
undef
if
scalar
(
@res
)
!=
7
;
return
{
device
=>
$res
[
0
],
fstype
=>
$res
[
1
],
mountpoint
=>
$res
[
6
]
my
$parser
=
sub
{
my
$line
=
shift
;
if
(
my
(
$fsid
,
$fstype
,
$mp
)
=
$line
=~
m|^(\S+.*)\s+(\S+)\s+\d+\s+\d+\s+\d+\s+\d+%\s+(/.*)$|
)
{
$res
=
{
device
=>
$fsid
,
fstype
=>
$fstype
,
mountpoint
=>
$mp
,
};
}
};
eval
{
PVE::Tools::
run_command
(
$cmd
,
errfunc
=>
sub
{},
outfunc
=>
$parser
);
};
warn
$@
if
$@
;
return
$res
;
}
sub
get_lvm_device
{
...
...
debian/changelog.Debian
View file @
af81df02
pve-manager (2.0-38) unstable; urgency=low
* fix bug 101: vzdump use run_command to avoid locale errors
-- Proxmox Support Team <support@proxmox.com> Thu, 01 Mar 2012 10:45:40 +0100
pve-manager (2.0-37) unstable; urgency=low
* updated fr translation
...
...
defines.mk
View file @
af81df02
...
...
@@ -2,7 +2,7 @@ RELEASE=2.0
VERSION=2.0
PACKAGE=pve-manager
PACKAGERELEASE=3
7
PACKAGERELEASE=3
8
BINDIR=${DESTDIR}/usr/bin
PERLLIBDIR=${DESTDIR}/usr/share/perl5
...
...
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