Remove /etc/bash_completion.d/xm
Remove /etc/bash_completion.d/xm from the package since the package bash-completion ships a more elaborate version of that file. Closes the Debian bugs #566683 and #550590.
This commit is contained in:
4
Makefile
4
Makefile
@@ -88,7 +88,7 @@ fixup-perms:
|
||||
chmod 644 etc/xen-tools.conf
|
||||
chmod 644 etc/xm.tmpl
|
||||
chmod 644 etc/xm-nfs.tmpl
|
||||
chmod 644 misc/xm misc/xen-tools misc/README
|
||||
chmod 644 misc/xen-tools misc/README
|
||||
|
||||
#
|
||||
# Install files to /etc/
|
||||
@@ -105,7 +105,6 @@ install-etc:
|
||||
cp partitions/*-* ${prefix}/etc/xen-tools/partitions.d/
|
||||
-mkdir -p ${prefix}/etc/bash_completion.d
|
||||
cp misc/xen-tools ${prefix}/etc/bash_completion.d/
|
||||
cp misc/xm ${prefix}/etc/bash_completion.d/
|
||||
|
||||
|
||||
#
|
||||
@@ -260,7 +259,6 @@ uninstall:
|
||||
-rm -rf ${prefix}/etc/xen-tools/skel
|
||||
-rmdir ${prefix}/etc/xen-tools/
|
||||
-rm -f ${prefix}/etc/bash_completion.d/xen-tools
|
||||
-rm -f ${prefix}/etc/bash_completion.d/xm
|
||||
rm -rf ${prefix}/usr/lib/xen-tools
|
||||
rm -f ${prefix}/usr/share/man/man8/xen-create-image.8.gz
|
||||
rm -f ${prefix}/usr/share/man/man8/xen-delete-image.8.gz
|
||||
|
||||
3
debian/changelog
vendored
3
debian/changelog
vendored
@@ -2,6 +2,9 @@ xen-tools (4.1-2) UNRELEASED; urgency=low
|
||||
|
||||
* New maintainer and upstream author
|
||||
* Reintroduction into Debian Unstable
|
||||
* Removal of /etc/bash_completion.d/xm from the package since
|
||||
bash-completion ships a more elaborate version of that file. (Closes:
|
||||
#566683, #550590)
|
||||
|
||||
--
|
||||
|
||||
|
||||
83
misc/xm
83
misc/xm
@@ -1,83 +0,0 @@
|
||||
#
|
||||
# /etc/bash_completion.d/xm
|
||||
#
|
||||
# Bash completion function for the 'xm' binary supplied with Xen.
|
||||
#
|
||||
# Steve
|
||||
# --
|
||||
# http://www.steve.org.uk
|
||||
#
|
||||
|
||||
|
||||
_xm()
|
||||
{
|
||||
local cur prev opts base running
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
|
||||
#
|
||||
# The basic options we'll complete.
|
||||
#
|
||||
opts="console create destroy help info list pause reboot shutdown top unpause"
|
||||
|
||||
|
||||
#
|
||||
# If we're called by root then we can see which instances
|
||||
# are running.
|
||||
#
|
||||
if [ $UID == 0 ]; then
|
||||
running=$(for x in `xm list --long | grep \(name | grep -v Domain-0 | awk '{ print $2 }' | tr -d \)`; do echo ${x} ; done )
|
||||
fi
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Complete the arguments to some of the basic commands.
|
||||
#
|
||||
case "${prev}" in
|
||||
console)
|
||||
COMPREPLY=( $(compgen -W "${running}" -- ${cur}) )
|
||||
return 0
|
||||
;;
|
||||
create)
|
||||
local names=$(for x in `ls -1 /etc/xen/*.cfg 2>/dev/null`; do echo ${x/\/etc\/xen\//} ; done )
|
||||
COMPREPLY=( $(compgen -W "${names}" -- ${cur}) )
|
||||
return 0
|
||||
;;
|
||||
destroy)
|
||||
COMPREPLY=( $(compgen -W "${running}" -- ${cur}) )
|
||||
return 0
|
||||
;;
|
||||
help)
|
||||
COMPREPLY=( $(compgen -W "--long" -- ${cur}) )
|
||||
return 0
|
||||
;;
|
||||
list)
|
||||
COMPREPLY=( $(compgen -W "--long" -- ${cur}) )
|
||||
return 0
|
||||
;;
|
||||
pause)
|
||||
COMPREPLY=( $(compgen -W "${running}" -- ${cur}) )
|
||||
return 0
|
||||
;;
|
||||
reboot)
|
||||
COMPREPLY=( $(compgen -W "${running}" -- ${cur}) )
|
||||
return 0
|
||||
;;
|
||||
shutdown)
|
||||
COMPREPLY=( $(compgen -W "${running}" -- ${cur}) )
|
||||
return 0
|
||||
;;
|
||||
unpause)
|
||||
COMPREPLY=( $(compgen -W "${running}" -- ${cur}) )
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
|
||||
return 0
|
||||
}
|
||||
complete -F _xm xm
|
||||
Reference in New Issue
Block a user