~serge-hallyn/ubuntu/oneiric/lxc/fix-lxc-clone-hostname

« back to all changes in this revision

Viewing changes to debian/patches/0014-lxc-ps-accept-n.patch

  • Committer: Bazaar Package Importer
  • Author(s): Serge Hallyn
  • Date: 2011-08-03 19:48:11 UTC
  • Revision ID: james.westby@ubuntu.com-20110803194811-cjv19krkfh3simfq
Tags: 0.7.4.2-3ubuntu6
* Add lxc-start-ephemeral by Robert Collins (LP: #807351)
* Add a --quit-on-stop arg to lxc-monitor for use by lxc-start-ephemeral.
* Modify lxcguest.conf to clear out /var/run (LP: #819621)
* Fix a bug in lxc-ps when cgroup-bin is not mounted.
* Modify lxc-ps to accept '-n name' and support '--' to separate options
  for ps.  (LP: #820720)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: support '-n name' and '-- ps-options'
 
2
 This is more consistent with other lxc commands
 
3
Author: Serge Hallyn <serge.hallyn@canonical.com>
 
4
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/820720
 
5
Forwarded: no
 
6
Index: ephemeral/src/lxc/lxc-ps.in
 
7
===================================================================
 
8
--- ephemeral.orig/src/lxc/lxc-ps.in    2011-08-03 22:28:39.854937920 -0500
 
9
+++ ephemeral/src/lxc/lxc-ps.in 2011-08-03 22:29:35.995216226 -0500
 
10
@@ -131,7 +131,7 @@
 
11
 
 
12
 sub display_usage {
 
13
     print <<EOF;
 
14
-Usage: lxc-ps [--help] [--usage] [--name NAME...] [--lxc] [ps options]
 
15
+Usage: lxc-ps [--help] [--usage] [-n|--name NAME...] [--lxc] [-- ps options]
 
16
 EOF
 
17
 }
 
18
 
 
19
@@ -154,7 +154,7 @@
 
20
 EOF
 
21
 }
 
22
 
 
23
-use Getopt::Long qw(:config no_auto_abbrev pass_through);
 
24
+use Getopt::Long qw(:config pass_through);
 
25
 
 
26
 my $arg_help  = '';
 
27
 my $arg_usage = '';
 
28
@@ -172,6 +172,10 @@
 
29
 if ($arg_help)  {display_help; exit 0;}
 
30
 if ($arg_usage) {display_usage; exit 0;}
 
31
 
 
32
+if ($ARGV[0] == '--') {
 
33
+       shift @ARGV;
 
34
+}
 
35
+
 
36
 # Should we filter processes related to containers
 
37
 if ($arg_lxc) {
 
38
        $LXC_DISPLAY = 1;