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
5d58fc90
Commit
5d58fc90
authored
Nov 10, 2016
by
Po-Hsu Lin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
templates: add squashfs support to lxc-ubuntu-cloud.in
Add squashfs format file support for lxc-ubuntu-cloud.in Signed-off-by:
Po-Hsu Lin
<
po-hsu.lin@canonical.com
>
parent
7a8082f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
lxc-ubuntu-cloud.in
templates/lxc-ubuntu-cloud.in
+13
-5
No files found.
templates/lxc-ubuntu-cloud.in
View file @
5d58fc90
...
...
@@ -297,7 +297,11 @@ else
[
"
$stream
"
=
"daily"
]
||
echo
"You may try with '--stream=daily'"
exit
1
fi
url2
=
`
echo
$url1
|
sed
-e
's/.tar.gz/-root\0/'
-e
's/.tar.gz/.tar.xz/'
`
if
[
"
$release
"
=
"precise"
]
||
[
"
$release
"
=
"trusty"
]
;
then
url2
=
`
echo
$url1
|
sed
-e
's/.tar.gz/-root\0/'
-e
's/.tar.gz/.tar.xz/'
`
else
url2
=
`
echo
$url1
|
sed
-e
's/.tar.gz/.squashfs/'
`
fi
fi
filename
=
`
basename
$url2
`
...
...
@@ -327,11 +331,15 @@ do_extract_rootfs() {
echo
"Extracting container rootfs"
mkdir
-p
$rootfs
cd
$rootfs
if
[
$in_userns
-eq
1
]
;
then
tar
--anchored
--exclude
=
"dev/*"
--numeric-owner
-xpf
"
$cache
/
$filename
"
mkdir
-p
$rootfs
/dev/pts/
if
[
"
${
filename
##*.
}
"
=
"squashfs"
]
;
then
unsquashfs
-n
-f
-d
"
$rootfs
"
"
$cache
/
$filename
"
else
tar
--numeric-owner
-xpf
"
$cache
/
$filename
"
if
[
$in_userns
-eq
1
]
;
then
tar
--anchored
--exclude
=
"dev/*"
--numeric-owner
-xpf
"
$cache
/
$filename
"
mkdir
-p
$rootfs
/dev/pts/
else
tar
--numeric-owner
-xpf
"
$cache
/
$filename
"
fi
fi
}
...
...
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