This is more consistent with other lxc commands
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/820720
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
sub display_usage {
print <<EOF;
-Usage: lxc-ps [--help] [--usage] [--name NAME...] [--lxc] [ps options]
+Usage: lxc-ps [--help] [--usage] [-n|--name NAME...] [--lxc] [-- ps options]
EOF
}
EOF
}
-use Getopt::Long qw(:config no_auto_abbrev pass_through);
+use Getopt::Long qw(:config pass_through);
my $arg_help = '';
my $arg_usage = '';
if ($arg_help) {display_help; exit 0;}
if ($arg_usage) {display_usage; exit 0;}
+if ($ARGV[0] == '--') {
+ shift @ARGV;
+}
+
# Should we filter processes related to containers
if ($arg_lxc) {
$LXC_DISPLAY = 1;