mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-06-15 08:02:38 +00:00
fix netstat script with separator
Allow to use -- as seperator in lxc-netstat, otherwise -n from lxc-netstat collides with netstats -n option (Closes: #641251). [Serge Hallyn] update patch to (1) not demand argument for exec (breaks) and (2) set $name not $lxc_name. Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
This commit is contained in:
parent
5548f2182e
commit
21e487f256
@ -18,7 +18,7 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "usage: $(basename $0) --name NAME [--] [NETSTAT_OPTIONS...]" >&2
|
echo "usage: $(basename $0) -n|--name <name> -- [netstat_options]" >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
help() {
|
help() {
|
||||||
@ -67,12 +67,18 @@ get_parent_cgroup()
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
shortoptions='hn:'
|
||||||
|
longoptions='help,name:,exec'
|
||||||
|
|
||||||
|
getopt=$(getopt -o $shortoptions --longoptions $longoptions -- "$@")
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
usage
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
exec=""
|
exec=""
|
||||||
|
|
||||||
if [ $# -eq 0 ]; then
|
eval set -- "$getopt"
|
||||||
usage
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
case $1 in
|
case $1 in
|
||||||
|
Loading…
Reference in New Issue
Block a user