Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
evz
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Тимофей Смирнов
evz
Commits
9d4aec7d
Commit
9d4aec7d
authored
Nov 17, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve list (-a,-q,ALL,all)
parent
b7270d1e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
evz
bin/evz
+15
-6
No files found.
bin/evz
View file @
9d4aec7d
...
...
@@ -46,6 +46,7 @@ $(get_help HELPOPT)
Examples:
# evz start ID ID ID
# evz list ALL
"
}
...
...
@@ -90,12 +91,12 @@ esac
list_all
()
{
vzlist
-1
vzlist
-1
"
$@
"
}
list_ALL
()
{
vzlist
-1
-a
vzlist
-1
-a
"
$@
"
}
# TODO: add all support for all cases
...
...
@@ -143,10 +144,18 @@ case $CMD in
vzctl start
$i
done
;;
list
)
# HELPCMD: list avaiable container(s)
# TODO -q for just id list
# TODO -a support
# https://bugs.etersoft.ru/show_bug.cgi?id=12016
list
)
# HELPCMD: list avaiable container(s) (use -q|-1 for list only ID, list ALL|-a for list ever stopped containers)
# if -q, just id list
if
[
-z
"
$verbose
"
]
||
[
"
$1
"
=
"-1"
]
||
[
"
$1
"
=
"-q"
]
;
then
[
-z
"
$verbose
"
]
||
shift
# some hack, TODO: drop all args
[
"
$1
"
=
"all"
]
&&
shift
LIST
=
"
$(
list_all
"
$@
"
)
"
[
"
$1
"
=
"ALL"
]
&&
LIST
=
"
$(
list_ALL
)
"
[
"
$1
"
=
"-a"
]
&&
LIST
=
"
$(
list_ALL
)
"
echo
"
$LIST
"
exit
fi
vzlist
"
$@
"
;;
exec
)
# HELPCMD: execute command by list (all for all containers)
...
...
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