Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
88fac0b4
Commit
88fac0b4
authored
Jun 25, 2015
by
Israel Shirk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Have nonesum run stat rather than nonesum because nonesum sums none. k.
parent
fe0fde19
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
builder/vmware/iso/driver_esx5.go
builder/vmware/iso/driver_esx5.go
+11
-4
No files found.
builder/vmware/iso/driver_esx5.go
View file @
88fac0b4
...
...
@@ -396,10 +396,17 @@ func (d *ESX5Driver) upload(dst, src string) error {
}
func
(
d
*
ESX5Driver
)
verifyChecksum
(
ctype
string
,
hash
string
,
file
string
)
bool
{
stdin
:=
bytes
.
NewBufferString
(
fmt
.
Sprintf
(
"%s %s"
,
hash
,
file
))
_
,
err
:=
d
.
run
(
stdin
,
fmt
.
Sprintf
(
"%ssum"
,
ctype
),
"-c"
)
if
err
!=
nil
{
return
false
if
(
ctype
==
"none"
)
{
err
:=
d
.
sh
(
"stat"
,
file
)
if
err
!=
nil
{
return
false
}
}
else
{
stdin
:=
bytes
.
NewBufferString
(
fmt
.
Sprintf
(
"%s %s"
,
hash
,
file
))
_
,
err
:=
d
.
run
(
stdin
,
fmt
.
Sprintf
(
"%ssum"
,
ctype
),
"-c"
)
if
err
!=
nil
{
return
false
}
}
return
true
}
...
...
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