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
18cd75a1
Commit
18cd75a1
authored
Feb 26, 2020
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- evz: rewrite engines detection
- evz: add EVZCTL env. to force engine
parent
0d058ca3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
evz
bin/evz
+12
-7
evz.8
man/evz.8
+3
-0
No files found.
bin/evz
View file @
18cd75a1
...
...
@@ -35,18 +35,23 @@ load_helper evz-functions
check_tty
SUPPORTED_ENGINES
=
"vzctl docker qm pct vboxmanage"
MCTL
=
""
[
-z
"
$MCTL
"
]
&&
which vzctl 2>/dev/null
>
/dev/null
&&
MCTL
=
"openvz"
[
-z
"
$MCTL
"
]
&&
which docker 2>/dev/null
>
/dev/null
&&
MCTL
=
"docker"
[
-z
"
$MCTL
"
]
&&
which qm 2>/dev/null
>
/dev/null
&&
MCTL
=
"qm"
[
-z
"
$MCTL
"
]
&&
which pct 2>/dev/null
>
/dev/null
&&
MCTL
=
"pct"
EVZCTL_supported
=
""
for
i
in
$SUPPORTED_ENGINES
;
do
which
$i
2>/dev/null
>
/dev/null
||
continue
MCTL
=
"
$i
"
[
"
$EVZCTL
"
=
"
$i
"
]
&&
EVZCTL_supported
=
"
$EVZCTL
"
&&
break
done
[
-n
"
$EVZCTL_supported
"
]
&&
MCTL
=
"
$EVZCTL_supported
"
[
-n
"
$MCTL
"
]
||
warning
"Can't detect supported virtualization tool"
# FIXME: override get_help
# print options description from HELPCMD/HELPOPT lines in the code
get_help
()
{
[
-z
"
$MCTL
"
]
&&
warning
"Can't detect supported virtualization tool"
&&
return
grep
-v
-h
--
"^#"
$0
$SHAREDIR
/evz-
$MCTL
|
grep
--
"#
$1
"
|
while
read
n
;
do
opt
=
$(
echo
$n
|
sed
-e
"s|) #
$1
:.*||g"
)
desc
=
$(
echo
$n
|
sed
-e
"s|.*) #
$1
:||g"
)
...
...
@@ -72,7 +77,7 @@ $(get_help HELPOPT)
print_version
()
{
echo
"Etersoft v
zctl & docker
wrapper version @VERSION@"
echo
"Etersoft v
irtualization
wrapper version @VERSION@"
echo
"Copyright (c) Etersoft 2017, 2020"
echo
"This program may be freely redistributed under the terms of the GNU AGPLv3."
}
...
...
@@ -80,7 +85,7 @@ print_version()
progname
=
"
${
0
##*/
}
"
Usage
=
"Usage:
$progname
[options] [<command>] [params]..."
Descr
=
"evz - v
zctl & docker wrapper
"
Descr
=
"evz - v
irtualization wrapper (supported engines:
$SUPPORTED_ENGINES
)
"
progname
=
"
${
0
##*/
}
"
...
...
man/evz.8
View file @
18cd75a1
...
...
@@ -36,6 +36,9 @@ Quiet mode
# evz destroy 5 10 - stop containers 5, 10 and destroy it
# evz restart 10 20 - restart containers 10 20
.SH ENV
You can override autodetected virtualization engine with EVZCTL environment variable.
.SH BUGS
Please report any bugs to lav@etersoft.ru
.SH EXIT STATUS
...
...
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