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
de09eccb
Commit
de09eccb
authored
May 17, 2013
by
Serge Hallyn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lxc-create: zfs: consistently use zfsroot, not zfs_root
Signed-off-by:
Serge Hallyn
<
serge.hallyn@ubuntu.com
>
Acked-by:
Stéphane Graber
<
stgraber@ubuntu.com
>
parent
dc92f6c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
lxc-create.in
src/lxc/lxc-create.in
+7
-7
No files found.
src/lxc/lxc-create.in
View file @
de09eccb
...
...
@@ -32,7 +32,7 @@ verify_btrfs() {
}
verify_zfs
()
{
if
which zfs
>
/dev/null 2>&1
&&
zfs get all
"
$zfs
_
root
"
>
/dev/null 2>&1
;
then
if
which zfs
>
/dev/null 2>&1
&&
zfs get all
"
$zfsroot
"
>
/dev/null 2>&1
;
then
echo
zfs
else
echo
no
...
...
@@ -198,7 +198,7 @@ while [ $# -gt 0 ]; do
;;
--zfsroot
)
optarg_check
$opt
"
$1
"
zfs
_
root
=
$1
zfsroot
=
$1
shift
;;
--
)
...
...
@@ -248,8 +248,8 @@ if [ -z "$lvname" ]; then
lvname
=
"
$lxc_name
"
fi
if
[
-z
"
$zfs
_
root
"
]
;
then
zfs
_
root
=
"tank/lxc"
if
[
-z
"
$zfsroot
"
]
;
then
zfsroot
=
"tank/lxc"
fi
if
[
"
$(
id
-u
)
"
!=
"0"
]
;
then
...
...
@@ -271,7 +271,7 @@ case "$backingstore" in
;;
zfs
)
if
[
`
verify_zfs
`
!=
'zfs'
]
;
then
echo
"missing 'zfs' command or
$zfs
_
root
is not zfs"
>
&2
echo
"missing 'zfs' command or
$zfsroot
is not zfs"
>
&2
exit
1
fi
;;
...
...
@@ -313,7 +313,7 @@ cleanup() {
elif
[
"
$backingstore
"
=
"btrfs"
]
;
then
btrfs subvolume delete
"
$rootfs
"
||
true
elif
[
"
$backingstore
"
=
"zfs"
]
;
then
zfs destroy
"
$zfs
_
root
/
$lxc_name
"
||
true
zfs destroy
"
$zfsroot
/
$lxc_name
"
||
true
fi
${
bindir
}
/lxc-destroy
-n
$lxc_name
-P
"
$lxc_path
"
...
...
@@ -325,7 +325,7 @@ trap cleanup HUP INT TERM
# set up container dir per backing store
if
[
"
$backingstore
"
=
"zfs"
]
;
then
zfs create
-omountpoint
=
$lxc_path
/
$lxc_name
/rootfs
"
$zfs
_
root
/
$lxc_name
"
zfs create
-omountpoint
=
$lxc_path
/
$lxc_name
/rootfs
"
$zfsroot
/
$lxc_name
"
elif
[
"
$backingstore
"
=
"btrfs"
]
;
then
mkdir
"
$lxc_path
/
$lxc_name
"
if
!
out
=
$(
btrfs subvolume create
"
$rootfs
"
2>&1
)
;
then
...
...
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