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
96819f4d
Commit
96819f4d
authored
Jan 21, 2010
by
Michel Normand
Committed by
Daniel Lezcano
Jan 21, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lxc-create to run even if not in PATH
Signed-off-by:
Michel Normand
<
normand@fr.ibm.com
>
Signed-off-by:
Daniel Lezcano
<
dlezcano@fr.ibm.com
>
parent
3bc15639
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
lxc-create.in
src/lxc/lxc-create.in
+6
-5
No files found.
src/lxc/lxc-create.in
View file @
96819f4d
...
...
@@ -43,6 +43,7 @@ help() {
shortoptions
=
'hn:f:t:'
longoptions
=
'help,name:,config:,template:'
lxc_path
=
@LXCPATH@
bindir
=
@BINDIR@
getopt
=
$(
getopt
-o
$shortoptions
--longoptions
$longoptions
--
"
$@
"
)
if
[
$?
!=
0
]
;
then
...
...
@@ -115,7 +116,7 @@ if [ -d "$lxc_path/$lxc_name" ]; then
exit
1
fi
trap
"lxc-destroy -n
$lxc_name
; echo aborted; exit 1"
SIGHUP SIGINT SIGTERM
trap
"
${
bindir
}
/
lxc-destroy -n
$lxc_name
; echo aborted; exit 1"
SIGHUP SIGINT SIGTERM
mkdir
-p
$lxc_path
/
$lxc_name
...
...
@@ -132,10 +133,10 @@ fi
if
[
!
-z
$lxc_template
]
;
then
type
lxc-
$lxc_template
type
${
bindir
}
/lxc-
$lxc_template
>
/dev/null
if
[
$?
-ne
0
]
;
then
echo
"unknown template '
$lxc_template
'"
lxc-destroy
-n
$lxc_name
${
bindir
}
/
lxc-destroy
-n
$lxc_name
exit
1
fi
...
...
@@ -165,10 +166,10 @@ if [ ! -z $lxc_template ]; then
read
dummy
fi
lxc-
$lxc_template
--path
=
$lxc_path
/
$lxc_name
--name
=
$lxc_name
${
bindir
}
/
lxc-
$lxc_template
--path
=
$lxc_path
/
$lxc_name
--name
=
$lxc_name
if
[
$?
-ne
0
]
;
then
echo
"failed to execute template '
$lxc_template
'"
lxc-destroy
-n
$lxc_name
${
bindir
}
/
lxc-destroy
-n
$lxc_name
exit
1
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