Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Chen Yisong
lxc
Commits
33aa351a
Commit
33aa351a
authored
Jan 14, 2014
by
Stéphane Graber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
download: Fix download_sig logic
Signed-off-by:
Stéphane Graber
<
stgraber@ubuntu.com
>
Acked-by:
Serge E. Hallyn
<
serge.hallyn@ubuntu.com
>
parent
83b4b1dc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
lxc-download.in
templates/lxc-download.in
+10
-3
No files found.
templates/lxc-download.in
View file @
33aa351a
...
@@ -73,10 +73,17 @@ download_file() {
...
@@ -73,10 +73,17 @@ download_file() {
}
}
download_sig
()
{
download_sig
()
{
download_file
$1
$2
noexit
if
!
download_file
$1
$2
noexit
;
then
if
[
"
$DOWNLOAD_VALIDATE
"
=
"true"
]
;
then
if
[
"
$DOWNLOAD_VALIDATE
"
=
"true"
]
;
then
if
[
"
$3
"
=
"normal"
]
;
then
echo
"ERROR: Failed to download http://
${
DOWNLOAD_SERVER
}
/
$1
"
1>&2
echo
"ERROR: Failed to download http://
${
DOWNLOAD_SERVER
}
/
$1
"
1>&2
exit
1
exit
1
else
return
1
fi
else
return
0
fi
fi
fi
}
}
...
@@ -268,11 +275,11 @@ if [ "$DOWNLOAD_USE_CACHE" = "false" ]; then
...
@@ -268,11 +275,11 @@ if [ "$DOWNLOAD_USE_CACHE" = "false" ]; then
echo
"Downloading the image index"
echo
"Downloading the image index"
if
!
download_file
${
DOWNLOAD_INDEX_PATH
}
.
${
DOWNLOAD_COMPAT_LEVEL
}
\
if
!
download_file
${
DOWNLOAD_INDEX_PATH
}
.
${
DOWNLOAD_COMPAT_LEVEL
}
\
${
DOWNLOAD_TEMP
}
/index noexit
||
${
DOWNLOAD_TEMP
}
/index noexit
||
!
download_
file
${
DOWNLOAD_INDEX_PATH
}
.
${
DOWNLOAD_COMPAT_LEVEL
}
.asc
\
!
download_
sig
${
DOWNLOAD_INDEX_PATH
}
.
${
DOWNLOAD_COMPAT_LEVEL
}
.asc
\
${
DOWNLOAD_TEMP
}
/index.asc noexit
;
then
${
DOWNLOAD_TEMP
}
/index.asc noexit
;
then
download_file
${
DOWNLOAD_INDEX_PATH
}
${
DOWNLOAD_TEMP
}
/index normal
download_file
${
DOWNLOAD_INDEX_PATH
}
${
DOWNLOAD_TEMP
}
/index normal
download_sig
${
DOWNLOAD_INDEX_PATH
}
.asc
\
download_sig
${
DOWNLOAD_INDEX_PATH
}
.asc
\
${
DOWNLOAD_TEMP
}
/index.asc
${
DOWNLOAD_TEMP
}
/index.asc
normal
fi
fi
gpg_validate
${
DOWNLOAD_TEMP
}
/index.asc
gpg_validate
${
DOWNLOAD_TEMP
}
/index.asc
...
...
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