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
2c3576e7
Commit
2c3576e7
authored
Nov 17, 2015
by
Stéphane Graber
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #693 from hsoft/debian-keyring
Fetch Debian archive GPG keyrings when they're not available
parents
a3ae59c6
f16fb156
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
lxc-debian.in
templates/lxc-debian.in
+19
-1
No files found.
templates/lxc-debian.in
View file @
2c3576e7
...
@@ -248,6 +248,24 @@ openssh-server
...
@@ -248,6 +248,24 @@ openssh-server
release
=
$3
release
=
$3
trap
cleanup EXIT SIGHUP SIGINT SIGTERM
trap
cleanup EXIT SIGHUP SIGINT SIGTERM
# If debian-archive-keyring isn't installed, fetch GPG keys directly
releasekeyring
=
/usr/share/keyrings/debian-archive-keyring.gpg
if
[
!
-f
$releasekeyring
]
;
then
releasekeyring
=
"
$cache
/archive-key.gpg"
case
$release
in
"squeeze"
)
gpgkeyname
=
"archive-key-6.0"
;;
"wheezy"
)
gpgkeyname
=
"archive-key-7.0"
;;
*
)
gpgkeyname
=
"archive-key-8"
;;
esac
wget https://ftp-master.debian.org/keys/
${
gpgkeyname
}
.asc
-O
-
--quiet
\
| gpg
--import
--no-default-keyring
--keyring
=
${
releasekeyring
}
fi
# check the mini debian was not already downloaded
# check the mini debian was not already downloaded
mkdir
-p
"
$cache
/partial-
$release
-
$arch
"
mkdir
-p
"
$cache
/partial-
$release
-
$arch
"
if
[
$?
-ne
0
]
;
then
if
[
$?
-ne
0
]
;
then
...
@@ -258,7 +276,7 @@ openssh-server
...
@@ -258,7 +276,7 @@ openssh-server
# download a mini debian into a cache
# download a mini debian into a cache
echo
"Downloading debian minimal ..."
echo
"Downloading debian minimal ..."
debootstrap
--verbose
--variant
=
minbase
--arch
=
$arch
\
debootstrap
--verbose
--variant
=
minbase
--arch
=
$arch
\
--include
=
$packages
\
--include
=
$packages
--keyring
=
${
releasekeyring
}
\
"
$release
"
"
$cache
/partial-
$release
-
$arch
"
$MIRROR
"
$release
"
"
$cache
/partial-
$release
-
$arch
"
$MIRROR
if
[
$?
-ne
0
]
;
then
if
[
$?
-ne
0
]
;
then
echo
"Failed to download the rootfs, aborting."
echo
"Failed to download the rootfs, aborting."
...
...
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