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
304143a8
Commit
304143a8
authored
May 08, 2013
by
Dwight Engen
Committed by
Serge Hallyn
May 08, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lxc-shutdown: fix lxc_path variable
Signed-off-by:
Dwight Engen
<
dwight.engen@oracle.com
>
Signed-off-by:
Serge Hallyn
<
serge.hallyn@ubuntu.com
>
parent
8d06bd13
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
lxc-shutdown.in
src/lxc/lxc-shutdown.in
+6
-6
No files found.
src/lxc/lxc-shutdown.in
View file @
304143a8
...
...
@@ -41,7 +41,7 @@ alarm() {
dolxcstop
()
{
echo
"Calling lxc-stop on
$lxc_name
"
lxc-stop
-n
$lxc_name
-P
"
$lxcpath
"
lxc-stop
-n
$lxc_name
-P
"
$lxc
_
path
"
exit
0
}
...
...
@@ -87,7 +87,7 @@ while [ $# -gt 0 ]; do
;;
-P
|
--lxcpath
)
optarg_check
$opt
"
$1
"
lxcpath
=
$1
lxc
_
path
=
$1
dowait
=
1
shift
;;
...
...
@@ -113,8 +113,8 @@ if [ -z "$lxc_name" ]; then
exit
1
fi
if
[
!
-d
"
$lxcpath
"
]
;
then
echo
"
$lxcpath
: no such directory"
if
[
!
-d
"
$lxc
_
path
"
]
;
then
echo
"
$lxc
_
path
: no such directory"
exit
1
fi
...
...
@@ -126,7 +126,7 @@ fi
which lxc-info
>
/dev/null 2>&1
||
{
echo
"lxc-info not found."
;
exit
1
;
}
which lxc-wait
>
/dev/null 2>&1
||
{
echo
"lxc-wait not found."
;
exit
1
;
}
pid
=
`
lxc-info
-n
$lxc_name
-P
"
$lxcpath
"
-p
2>/dev/null |
awk
'{ print $2 }'
`
pid
=
`
lxc-info
-n
$lxc_name
-P
"
$lxc
_
path
"
-p
2>/dev/null |
awk
'{ print $2 }'
`
if
[
"
$pid
"
=
"-1"
]
;
then
echo
"
$lxc_name
is not running"
exit
1
...
...
@@ -149,7 +149,7 @@ if [ $timeout != "-1" ]; then
alarmpid
=
$!
fi
while
!
lxc-info
-n
$lxc_name
-P
"
$lxcpath
"
--state-is
STOPPED
;
do
while
!
lxc-info
-n
$lxc_name
-P
"
$lxc
_
path
"
--state-is
STOPPED
;
do
sleep
1
done
...
...
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