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
4f97fce4
Commit
4f97fce4
authored
Feb 24, 2016
by
Stéphane Graber
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #844 from brauner/2016-02-22/manpage_update
configure.ac: add --enable-deprecated flag
parents
55290b83
d0a6bd39
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
49 additions
and
16 deletions
+49
-16
lxc.in
config/bash/lxc.in
+1
-1
configure.ac
configure.ac
+7
-0
Makefile.am
doc/Makefile.am
+3
-1
Makefile.am
doc/ja/Makefile.am
+3
-1
Makefile.am
doc/ko/Makefile.am
+3
-1
lxc-clone.sgml.in
doc/lxc-clone.sgml.in
+2
-1
lxc-start-ephemeral.sgml.in
doc/lxc-start-ephemeral.sgml.in
+1
-1
Makefile.am
src/lxc/Makefile.am
+10
-2
arguments.h
src/lxc/arguments.h
+1
-1
lxc-start-ephemeral.in
src/lxc/lxc-start-ephemeral.in
+12
-3
lxc_clone.c
src/lxc/lxc_clone.c
+2
-0
lxc-test-cloneconfig
src/tests/lxc-test-cloneconfig
+1
-1
lxc-test-snapdeps
src/tests/lxc-test-snapdeps
+2
-2
lxc-test-unpriv
src/tests/lxc-test-unpriv
+1
-1
No files found.
config/bash/lxc.in
View file @
4f97fce4
...
@@ -98,6 +98,6 @@ _have lxc-start && {
...
@@ -98,6 +98,6 @@ _have lxc-start && {
complete -o default -F _lxc_generic_t lxc-create
complete -o default -F _lxc_generic_t lxc-create
complete -o default -F _lxc_generic_o lxc-c
lone
complete -o default -F _lxc_generic_o lxc-c
opy
complete -o default -F _lxc_generic_o lxc-start-ephemeral
complete -o default -F _lxc_generic_o lxc-start-ephemeral
}
}
configure.ac
View file @
4f97fce4
...
@@ -147,6 +147,13 @@ if test "x$with_systemdsystemunitdir" != "xno"; then
...
@@ -147,6 +147,13 @@ if test "x$with_systemdsystemunitdir" != "xno"; then
AC_SUBST([SYSTEMD_UNIT_DIR], [$with_systemdsystemunitdir])
AC_SUBST([SYSTEMD_UNIT_DIR], [$with_systemdsystemunitdir])
fi
fi
# Allow enabling deprecated executables
AC_ARG_ENABLE([deprecated],
[AC_HELP_STRING([--enable-deprecated],
[enable deprecated executables [default=no]])],
[], [enable_deprecated=false])
AM_CONDITIONAL([ENABLE_DEPRECATED], [test "x$enable_deprecated" = "xyes"])
# Allow disabling rpath
# Allow disabling rpath
AC_ARG_ENABLE([rpath],
AC_ARG_ENABLE([rpath],
[AC_HELP_STRING([--enable-rpath], [set rpath in executables [default=no]])],
[AC_HELP_STRING([--enable-rpath], [set rpath in executables [default=no]])],
...
...
doc/Makefile.am
View file @
4f97fce4
...
@@ -21,7 +21,6 @@ man_MANS = \
...
@@ -21,7 +21,6 @@ man_MANS = \
lxc-cgroup.1
\
lxc-cgroup.1
\
lxc-checkconfig.1
\
lxc-checkconfig.1
\
lxc-checkpoint.1
\
lxc-checkpoint.1
\
lxc-clone.1
\
lxc-config.1
\
lxc-config.1
\
lxc-console.1
\
lxc-console.1
\
lxc-copy.1
\
lxc-copy.1
\
...
@@ -50,9 +49,12 @@ man_MANS = \
...
@@ -50,9 +49,12 @@ man_MANS = \
\
\
lxc.7
lxc.7
if
ENABLE_DEPRECATED
man_MANS
+=
lxc-clone.1
if
ENABLE_PYTHON
if
ENABLE_PYTHON
man_MANS
+=
lxc-start-ephemeral.1
man_MANS
+=
lxc-start-ephemeral.1
endif
endif
endif
%.1
:
%.sgml
%.1
:
%.sgml
$(db2xman)
$<
$(db2xman)
$<
...
...
doc/ja/Makefile.am
View file @
4f97fce4
...
@@ -13,7 +13,6 @@ man_MANS = \
...
@@ -13,7 +13,6 @@ man_MANS = \
lxc-cgroup.1
\
lxc-cgroup.1
\
lxc-checkconfig.1
\
lxc-checkconfig.1
\
lxc-checkpoint.1
\
lxc-checkpoint.1
\
lxc-clone.1
\
lxc-config.1
\
lxc-config.1
\
lxc-console.1
\
lxc-console.1
\
lxc-copy.1
\
lxc-copy.1
\
...
@@ -42,9 +41,12 @@ man_MANS = \
...
@@ -42,9 +41,12 @@ man_MANS = \
\
\
lxc.7
lxc.7
if
ENABLE_DEPRECATED
man_MANS
+=
lxc-clone.1
if
ENABLE_PYTHON
if
ENABLE_PYTHON
man_MANS
+=
lxc-start-ephemeral.1
man_MANS
+=
lxc-start-ephemeral.1
endif
endif
endif
%.1
:
%.sgml
%.1
:
%.sgml
$(db2xman)
--encoding
=
UTF-8
$<
$(db2xman)
--encoding
=
UTF-8
$<
...
...
doc/ko/Makefile.am
View file @
4f97fce4
...
@@ -13,7 +13,6 @@ man_MANS = \
...
@@ -13,7 +13,6 @@ man_MANS = \
lxc-cgroup.1
\
lxc-cgroup.1
\
lxc-checkconfig.1
\
lxc-checkconfig.1
\
lxc-checkpoint.1
\
lxc-checkpoint.1
\
lxc-clone.1
\
lxc-config.1
\
lxc-config.1
\
lxc-console.1
\
lxc-console.1
\
lxc-copy.1
\
lxc-copy.1
\
...
@@ -42,9 +41,12 @@ man_MANS = \
...
@@ -42,9 +41,12 @@ man_MANS = \
\
\
lxc.7
lxc.7
if
ENABLE_DEPRECATED
man_MANS
+=
lxc-clone.1
if
ENABLE_PYTHON
if
ENABLE_PYTHON
man_MANS
+=
lxc-start-ephemeral.1
man_MANS
+=
lxc-start-ephemeral.1
endif
endif
endif
%.1
:
%.sgml
%.1
:
%.sgml
$(db2xman)
--encoding
=
UTF-8
$<
$(db2xman)
--encoding
=
UTF-8
$<
...
...
doc/lxc-clone.sgml.in
View file @
4f97fce4
...
@@ -278,7 +278,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
...
@@ -278,7 +278,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
<refsect1>
<refsect1>
<title>Notes</title>
<title>Notes</title>
<para>
<para>
<command>lxc-clone</command> is superseded by <command>lxc-copy</command>.
<command>lxc-clone</command> is deprecated in favor of
<command>lxc-copy</command>.
</para>
</para>
</refsect1>
</refsect1>
...
...
doc/lxc-start-ephemeral.sgml.in
View file @
4f97fce4
...
@@ -230,7 +230,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
...
@@ -230,7 +230,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
<refsect1>
<refsect1>
<title>Notes</title>
<title>Notes</title>
<para>
<para>
<command>lxc-start-ephemeral</command> is
superseded by
<command>lxc-start-ephemeral</command> is
deprecated in favor of
<command>lxc-copy</command>.
<command>lxc-copy</command>.
</para>
</para>
</refsect1>
</refsect1>
...
...
src/lxc/Makefile.am
View file @
4f97fce4
...
@@ -192,16 +192,17 @@ bin_SCRIPTS = lxc-checkconfig
...
@@ -192,16 +192,17 @@ bin_SCRIPTS = lxc-checkconfig
EXTRA_DIST
=
\
EXTRA_DIST
=
\
lxc-top.lua
lxc-top.lua
if
ENABLE_DEPRECATED
if
ENABLE_PYTHON
if
ENABLE_PYTHON
bin_SCRIPTS
+=
lxc-start-ephemeral
bin_SCRIPTS
+=
lxc-start-ephemeral
endif
endif
endif
bin_PROGRAMS
=
\
bin_PROGRAMS
=
\
lxc-attach
\
lxc-attach
\
lxc-autostart
\
lxc-autostart
\
lxc-cgroup
\
lxc-cgroup
\
lxc-checkpoint
\
lxc-checkpoint
\
lxc-clone
\
lxc-copy
\
lxc-copy
\
lxc-config
\
lxc-config
\
lxc-console
\
lxc-console
\
...
@@ -222,6 +223,10 @@ bin_PROGRAMS = \
...
@@ -222,6 +223,10 @@ bin_PROGRAMS = \
lxc-usernsexec
\
lxc-usernsexec
\
lxc-wait
lxc-wait
if
ENABLE_DEPRECATED
bin_PROGRAMS
+=
lxc-clone
endif
sbin_PROGRAMS
=
init.lxc
sbin_PROGRAMS
=
init.lxc
pkglibexec_PROGRAMS
=
\
pkglibexec_PROGRAMS
=
\
lxc-monitord
\
lxc-monitord
\
...
@@ -246,7 +251,6 @@ lxc_info_SOURCES = lxc_info.c
...
@@ -246,7 +251,6 @@ lxc_info_SOURCES = lxc_info.c
init_lxc_SOURCES
=
lxc_init.c
init_lxc_SOURCES
=
lxc_init.c
lxc_monitor_SOURCES
=
lxc_monitor.c
lxc_monitor_SOURCES
=
lxc_monitor.c
lxc_monitord_SOURCES
=
lxc_monitord.c
lxc_monitord_SOURCES
=
lxc_monitord.c
lxc_clone_SOURCES
=
lxc_clone.c
lxc_ls_SOURCES
=
lxc_ls.c
lxc_ls_SOURCES
=
lxc_ls.c
lxc_copy_SOURCES
=
lxc_copy.c
lxc_copy_SOURCES
=
lxc_copy.c
lxc_start_SOURCES
=
lxc_start.c
lxc_start_SOURCES
=
lxc_start.c
...
@@ -261,6 +265,10 @@ lxc_usernsexec_SOURCES = lxc_usernsexec.c
...
@@ -261,6 +265,10 @@ lxc_usernsexec_SOURCES = lxc_usernsexec.c
lxc_user_nic_SOURCES
=
lxc_user_nic.c network.c network.h
lxc_user_nic_SOURCES
=
lxc_user_nic.c network.c network.h
lxc_checkpoint_SOURCES
=
lxc_checkpoint.c
lxc_checkpoint_SOURCES
=
lxc_checkpoint.c
if
ENABLE_DEPRECATED
lxc_clone_SOURCES
=
lxc_clone.c
endif
if
!HAVE_GETSUBOPT
if
!HAVE_GETSUBOPT
lxc_copy_SOURCES
+=
../include/getsubopt.c ../include/getsubopt.h
lxc_copy_SOURCES
+=
../include/getsubopt.c ../include/getsubopt.h
endif
endif
...
...
src/lxc/arguments.h
View file @
4f97fce4
...
@@ -102,7 +102,7 @@ struct lxc_arguments {
...
@@ -102,7 +102,7 @@ struct lxc_arguments {
int
list
;
int
list
;
char
*
groups
;
/* also used by lxc-ls */
char
*
groups
;
/* also used by lxc-ls */
/* lxc-snapshot and lxc-c
lone
*/
/* lxc-snapshot and lxc-c
opy
*/
enum
task
{
enum
task
{
CLONE
,
CLONE
,
DESTROY
,
DESTROY
,
...
...
src/lxc/lxc-start-ephemeral.in
View file @
4f97fce4
...
@@ -36,8 +36,14 @@ import tempfile
...
@@ -36,8 +36,14 @@ import tempfile
_
=
gettext
.
gettext
_
=
gettext
.
gettext
gettext
.
textdomain
(
"lxc-start-ephemeral"
)
gettext
.
textdomain
(
"lxc-start-ephemeral"
)
# Other functions
# Other functions
def
printstderr
(
*
args
):
print
(
"lxc-start-ephemeral is deprecated in favor of lxc-copy
\n
"
,
*
args
,
file
=
sys
.
stderr
)
def
randomMAC
():
def
randomMAC
():
import
random
import
random
...
@@ -61,6 +67,9 @@ def get_rundir():
...
@@ -61,6 +67,9 @@ def get_rundir():
raise
Exception
(
"Unable to find a runtime directory"
)
raise
Exception
(
"Unable to find a runtime directory"
)
# Inform that lxc-start-ephemeral is deprecated
printstderr
()
# Begin parsing the command line
# Begin parsing the command line
parser
=
argparse
.
ArgumentParser
(
description
=
_
(
parser
=
argparse
.
ArgumentParser
(
description
=
_
(
"LXC: Start an ephemeral container"
),
"LXC: Start an ephemeral container"
),
...
@@ -120,11 +129,11 @@ parser.add_argument("--version", action="version", version=lxc.version)
...
@@ -120,11 +129,11 @@ parser.add_argument("--version", action="version", version=lxc.version)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
#
#
Check that -d and CMD aren't used at the same time
# Check that -d and CMD aren't used at the same time
if
args
.
command
and
args
.
daemon
:
if
args
.
command
and
args
.
daemon
:
parser
.
error
(
_
(
"You can't use -d and a command at the same time."
))
parser
.
error
(
_
(
"You can't use -d and a command at the same time."
))
#
#
Check that -k isn't used with -s tmpfs
# Check that -k isn't used with -s tmpfs
if
not
args
.
storage_type
:
if
not
args
.
storage_type
:
if
args
.
keep_data
:
if
args
.
keep_data
:
args
.
storage_type
=
"dir"
args
.
storage_type
=
"dir"
...
...
src/lxc/lxc_clone.c
View file @
4f97fce4
...
@@ -121,6 +121,8 @@ int main(int argc, char *argv[])
...
@@ -121,6 +121,8 @@ int main(int argc, char *argv[])
int
c
;
int
c
;
bool
ret
;
bool
ret
;
fprintf
(
stderr
,
"lxc-clone is deprecated in favor of lxc-copy.
\n\n
"
);
if
(
argc
<
3
)
if
(
argc
<
3
)
usage
(
argv
[
0
]);
usage
(
argv
[
0
]);
...
...
src/tests/lxc-test-cloneconfig
View file @
4f97fce4
...
@@ -124,7 +124,7 @@ for f in $s/*.conf; do
...
@@ -124,7 +124,7 @@ for f in $s/*.conf; do
echo
"Test
$testnum
starting (
$f
)"
echo
"Test
$testnum
starting (
$f
)"
lxc-create
-t
busybox
-f
$f
-n
lxctestb
lxc-create
-t
busybox
-f
$f
-n
lxctestb
touch
$CONTAINER_PATH
/x1
touch
$CONTAINER_PATH
/x1
lxc-c
lone
-s
-o
lxctestb
-n
lxctestb2
lxc-c
opy
-s
-n
lxctestb
-N
lxctestb2
# verify that # nics did not change
# verify that # nics did not change
verify_numnics
verify_numnics
# verify hwaddr, if any changed
# verify hwaddr, if any changed
...
...
src/tests/lxc-test-snapdeps
View file @
4f97fce4
...
@@ -52,7 +52,7 @@ cleanup
...
@@ -52,7 +52,7 @@ cleanup
trap
cleanup EXIT SIGHUP SIGINT SIGTERM
trap
cleanup EXIT SIGHUP SIGINT SIGTERM
lxc-create
-t
busybox
-n
snapdeptest
lxc-create
-t
busybox
-n
snapdeptest
lxc-c
lone
-s
-o
snapdeptest
-n
snapdeptest1
lxc-c
opy
-s
-n
snapdeptest
-N
snapdeptest1
fail
=
0
fail
=
0
lxc-destroy
-n
snapdeptest
||
fail
=
1
lxc-destroy
-n
snapdeptest
||
fail
=
1
if
[
$fail
-eq
0
]
;
then
if
[
$fail
-eq
0
]
;
then
...
@@ -61,7 +61,7 @@ if [ $fail -eq 0 ]; then
...
@@ -61,7 +61,7 @@ if [ $fail -eq 0 ]; then
fi
fi
for
i
in
`
seq
2 20
`
;
do
for
i
in
`
seq
2 20
`
;
do
lxc-c
lone
-s
-o
snapdeptest
-n
snapdeptest
$i
lxc-c
opy
-s
-n
snapdeptest
-N
snapdeptest
$i
done
done
verify_deps 20
verify_deps 20
...
...
src/tests/lxc-test-unpriv
View file @
4f97fce4
...
@@ -134,7 +134,7 @@ run_cmd lxc-info -n c1
...
@@ -134,7 +134,7 @@ run_cmd lxc-info -n c1
run_cmd lxc-attach
-n
c1
--
/bin/true
run_cmd lxc-attach
-n
c1
--
/bin/true
run_cmd lxc-stop
-n
c1
run_cmd lxc-stop
-n
c1
run_cmd lxc-c
lone
-s
-o
c1
-n
c2
run_cmd lxc-c
opy
-s
-n
c1
-N
c2
run_cmd lxc-start
-n
c2
-d
run_cmd lxc-start
-n
c2
-d
p1
=
$(
run_cmd lxc-info
-n
c2
-p
-H
)
p1
=
$(
run_cmd lxc-info
-n
c2
-p
-H
)
[
"
$p1
"
!=
"-1"
]
||
{
echo
"Failed to start container c2"
;
false
;
}
[
"
$p1
"
!=
"-1"
]
||
{
echo
"Failed to start container c2"
;
false
;
}
...
...
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