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
8304f538
Commit
8304f538
authored
Oct 24, 2011
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corretly set ostemplate
parent
7aca3156
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
OpenVZ.pm
PVE/API2/OpenVZ.pm
+9
-2
No files found.
PVE/API2/OpenVZ.pm
View file @
8304f538
...
@@ -240,6 +240,8 @@ __PACKAGE__->register_method({
...
@@ -240,6 +240,8 @@ __PACKAGE__->register_method({
if
(
$ostemplate
eq
'
-
')
{
if
(
$ostemplate
eq
'
-
')
{
die
"
pipe requires cli environment
\n
"
die
"
pipe requires cli environment
\n
"
if
$rpcenv
->
{
type
}
ne
'
cli
';
if
$rpcenv
->
{
type
}
ne
'
cli
';
die
"
pipe can only be used with restore tasks
\n
"
if
!
$param
->
{
restore
};
$archive
=
'
-
';
$archive
=
'
-
';
}
else
{
}
else
{
if
(
PVE::Storage::
parse_volume_id
(
$ostemplate
,
1
))
{
if
(
PVE::Storage::
parse_volume_id
(
$ostemplate
,
1
))
{
...
@@ -268,7 +270,12 @@ __PACKAGE__->register_method({
...
@@ -268,7 +270,12 @@ __PACKAGE__->register_method({
$param
->
{
nameserver
}
=
join
('
',
@ns
)
if
scalar
(
@ns
);
$param
->
{
nameserver
}
=
join
('
',
@ns
)
if
scalar
(
@ns
);
}
}
PVE::OpenVZ::
update_ovz_config
(
$conf
,
$param
);
PVE::OpenVZ::
update_ovz_config
(
$vmid
,
$conf
,
$param
);
if
(
!
$param
->
{
restore
})
{
$conf
->
{
ostemplate
}
->
{
value
}
=
$archive
;
$conf
->
{
ostemplate
}
->
{
value
}
=~
s
|^.*/||
;
$conf
->
{
ostemplate
}
->
{
value
}
=~
s/\.tar\.(gz|bz2)$//
;
}
my
$rawconf
=
PVE::OpenVZ::
generate_raw_config
(
$pve_base_ovz_config
,
$conf
);
my
$rawconf
=
PVE::OpenVZ::
generate_raw_config
(
$pve_base_ovz_config
,
$conf
);
...
@@ -335,7 +342,7 @@ __PACKAGE__->register_method({
...
@@ -335,7 +342,7 @@ __PACKAGE__->register_method({
die
"
checksum missmatch (file change by other user?)
\n
"
die
"
checksum missmatch (file change by other user?)
\n
"
if
$digest
&&
$digest
ne
$conf
->
{
digest
};
if
$digest
&&
$digest
ne
$conf
->
{
digest
};
my
$changes
=
PVE::OpenVZ::
update_ovz_config
(
$conf
,
$param
);
my
$changes
=
PVE::OpenVZ::
update_ovz_config
(
$
vmid
,
$
conf
,
$param
);
return
if
scalar
(
@$changes
)
<=
0
;
return
if
scalar
(
@$changes
)
<=
0
;
...
...
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