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
7ed025e1
Commit
7ed025e1
authored
Sep 13, 2013
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bump version to 3.1-11
vzdump: fix hook script environment
parent
f0baec5f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
3 deletions
+19
-3
VZDump.pm
PVE/VZDump.pm
+5
-1
changelog.Debian
debian/changelog.Debian
+6
-0
defines.mk
defines.mk
+1
-1
vzdump-hook-script.pl
vzdump-hook-script.pl
+7
-1
No files found.
PVE/VZDump.pm
View file @
7ed025e1
...
@@ -646,7 +646,11 @@ sub run_hook_script {
...
@@ -646,7 +646,11 @@ sub run_hook_script {
local
%
ENV
;
local
%
ENV
;
foreach
my
$ek
(
qw(vmtype dumpdir hostname tarfile logfile storeid)
)
{
# set immutable opts directly (so they are available in all phases)
$ENV
{
STOREID
}
=
$opts
->
{
storage
}
if
$opts
->
{
storage
};
$ENV
{
DUMPDIR
}
=
$opts
->
{
dumpdir
}
if
$opts
->
{
dumpdir
};
foreach
my
$ek
(
qw(vmtype hostname tarfile logfile)
)
{
$ENV
{
uc
(
$ek
)}
=
$task
->
{
$ek
}
if
$task
->
{
$ek
};
$ENV
{
uc
(
$ek
)}
=
$task
->
{
$ek
}
if
$task
->
{
$ek
};
}
}
...
...
debian/changelog.Debian
View file @
7ed025e1
pve-manager (3.1-11) unstable; urgency=low
* vzdump: fix hook script environment for job-* phase
-- Proxmox Support Team <support@proxmox.com> Fri, 13 Sep 2013 06:55:30 +0200
pve-manager (3.1-10) unstable; urgency=low
pve-manager (3.1-10) unstable; urgency=low
* vzdump: pass storage ID to hook scripts
* vzdump: pass storage ID to hook scripts
...
...
defines.mk
View file @
7ed025e1
...
@@ -2,7 +2,7 @@ RELEASE=3.1
...
@@ -2,7 +2,7 @@ RELEASE=3.1
VERSION=3.1
VERSION=3.1
PACKAGE=pve-manager
PACKAGE=pve-manager
PACKAGERELEASE=1
0
PACKAGERELEASE=1
1
BINDIR=${DESTDIR}/usr/bin
BINDIR=${DESTDIR}/usr/bin
PERLLIBDIR=${DESTDIR}/usr/share/perl5
PERLLIBDIR=${DESTDIR}/usr/share/perl5
...
...
vzdump-hook-script.pl
View file @
7ed025e1
...
@@ -12,6 +12,12 @@ if ($phase eq 'job-start' ||
...
@@ -12,6 +12,12 @@ if ($phase eq 'job-start' ||
$phase
eq
'
job-end
'
||
$phase
eq
'
job-end
'
||
$phase
eq
'
job-abort
')
{
$phase
eq
'
job-abort
')
{
my
$dumpdir
=
$ENV
{
DUMPDIR
};
my
$storeid
=
$ENV
{
STOREID
};
print
"
HOOK-ENV: dumpdir=
$dumpdir
;storeid=
$storeid
\n
";
# do what you want
# do what you want
}
elsif
(
$phase
eq
'
backup-start
'
||
}
elsif
(
$phase
eq
'
backup-start
'
||
...
@@ -39,7 +45,7 @@ if ($phase eq 'job-start' ||
...
@@ -39,7 +45,7 @@ if ($phase eq 'job-start' ||
# logfile is only available in phase 'log-end'
# logfile is only available in phase 'log-end'
my
$logfile
=
$ENV
{
LOGFILE
};
my
$logfile
=
$ENV
{
LOGFILE
};
print
"
HOOK-ENV: vmtype=
$vmtype
;dumpdir=
$dumpdir
;hostname=
$hostname
;tarfile=
$tarfile
;logfile=
$logfile
\n
";
print
"
HOOK-ENV: vmtype=
$vmtype
;dumpdir=
$dumpdir
;
storeid=
$storeid
;
hostname=
$hostname
;tarfile=
$tarfile
;logfile=
$logfile
\n
";
# example: copy resulting backup file to another host using scp
# example: copy resulting backup file to another host using scp
if
(
$phase
eq
'
backup-end
')
{
if
(
$phase
eq
'
backup-end
')
{
...
...
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