diff --git a/doc/lxc-clone.sgml.in b/doc/lxc-clone.sgml.in index 42c119cdb..f134b8000 100644 --- a/doc/lxc-clone.sgml.in +++ b/doc/lxc-clone.sgml.in @@ -278,7 +278,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Notes - lxc-clone is superseded by lxc-copy. + lxc-clone is deprecated in favor of + lxc-copy. diff --git a/doc/lxc-start-ephemeral.sgml.in b/doc/lxc-start-ephemeral.sgml.in index 6db405943..683157871 100644 --- a/doc/lxc-start-ephemeral.sgml.in +++ b/doc/lxc-start-ephemeral.sgml.in @@ -230,7 +230,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Notes - lxc-start-ephemeral is superseded by + lxc-start-ephemeral is deprecated in favor of lxc-copy. diff --git a/src/lxc/lxc-start-ephemeral.in b/src/lxc/lxc-start-ephemeral.in index 8d33775b8..7e0c8eaf9 100644 --- a/src/lxc/lxc-start-ephemeral.in +++ b/src/lxc/lxc-start-ephemeral.in @@ -36,8 +36,14 @@ import tempfile _ = gettext.gettext gettext.textdomain("lxc-start-ephemeral") - # Other functions + + +def printstderr(*args): + print("lxc-start-ephemeral is deprecated in favor of lxc-copy\n", + *args, file=sys.stderr) + + def randomMAC(): import random @@ -61,6 +67,9 @@ def get_rundir(): raise Exception("Unable to find a runtime directory") +# Inform that lxc-start-ephemeral is deprecated +printstderr() + # Begin parsing the command line parser = argparse.ArgumentParser(description=_( "LXC: Start an ephemeral container"), @@ -120,11 +129,11 @@ parser.add_argument("--version", action="version", version=lxc.version) 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: 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 args.keep_data: args.storage_type = "dir" diff --git a/src/lxc/lxc_clone.c b/src/lxc/lxc_clone.c index e88c18bc3..6bd222648 100644 --- a/src/lxc/lxc_clone.c +++ b/src/lxc/lxc_clone.c @@ -121,6 +121,8 @@ int main(int argc, char *argv[]) int c; bool ret; + fprintf(stderr, "lxc-clone is deprecated in favor of lxc-copy.\n\n"); + if (argc < 3) usage(argv[0]);