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
1e1bb42a
Commit
1e1bb42a
authored
Apr 29, 2013
by
Serge Hallyn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add vg and zfsroot options to lxc.functions and use in lxc-create
also make sure to drop spaces between = and variable in lxc.conf Signed-off-by:
Serge Hallyn
<
serge.hallyn@ubuntu.com
>
parent
31a95fec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
lxc-create.in
src/lxc/lxc-create.in
+2
-1
lxc.functions.in
src/lxc/lxc.functions.in
+20
-0
No files found.
src/lxc/lxc-create.in
View file @
1e1bb42a
...
@@ -134,7 +134,8 @@ optarg_check() {
...
@@ -134,7 +134,8 @@ optarg_check() {
backingstore
=
_unset
backingstore
=
_unset
fstype
=
ext4
fstype
=
ext4
fssize
=
500M
fssize
=
500M
vgname
=
lxc
vgname
=
$lxc_vg
zfsroot
=
$lxc_zfsroot
custom_rootfs
=
""
custom_rootfs
=
""
while
[
$#
-gt
0
]
;
do
while
[
$#
-gt
0
]
;
do
...
...
src/lxc/lxc.functions.in
View file @
1e1bb42a
...
@@ -34,4 +34,24 @@ get_default_lxcpath() {
...
@@ -34,4 +34,24 @@ get_default_lxcpath() {
fi
fi
}
}
get_default_vg() {
LXC_VG=$(grep -v "^#" "$globalconf" 2>/dev/null | grep "[ \t]*lvm_vg[ \t]*=") || true
if [ -n "$LXC_VG" ]; then
echo $LXC_VG | awk -F= '{ print $2 }'
else
echo "lxc"
fi
}
get_default_zfsroot() {
LXC_ZFSROOT=$(grep -v "^#" "$globalconf" 2>/dev/null | grep "[ \t]*zfsroot[ \t]*=") || true
if [ -n "$LXC_ZFSROOT" ]; then
echo $LXC_ZFSROOT | awk -F= '{ print $2 }'
else
echo "tank/lxc"
fi
}
lxc_path=`get_default_lxcpath`
lxc_path=`get_default_lxcpath`
lxc_vg=`get_default_vg`
lxc_zfsroot=`get_default_zfsroot`
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