1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

Fix bash completion for sudo users (mostly cosmetic) + man page and

example fixes

Ticket: CM-2911
Reviewed By: CCR-1637
Testing Done: tested ifupdown2 sanity and bash completion

The python argcomplete module that i use for ifupdown2 has a limitation
that it does not work with sudo when used in the global mode. But there is
a workaround for it online (long story short...instead of enabling the global
argparse complete ...the author recommends registering argparse complete bash
completion individually for your script). This patch does just that.

This patch also moves the udev overrides to their respective packages.
Two of them are owned by ifupdown2.

Conflicts:
	rootconf/default/home/cumulus/sysroot-complete
This commit is contained in:
Roopa Prabhu
2014-06-06 23:00:24 -07:00
parent 69cf2f0de7
commit 522bf8e68b
8 changed files with 98 additions and 34 deletions

View File

@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -e
@@ -7,7 +7,7 @@ rm -f /sbin/ifup /sbin/ifdown /sbin/ifquery
case "$1" in
purge)
# Note: We don't remove /etc/network/interfaces
rm -f /etc/network/run/ifstate
rm -f /var/tmp/network/ifstatenew
if [ -L /etc/network/run ] ; then
rm -f /etc/network/run
@@ -17,6 +17,11 @@ case "$1" in
;;
esac
udevlink=$(readlink /etc/udev/rules.d/80-networking.rules 2>/dev/null)
[ -n "$udevlink" -a "$udevlink" == "/dev/null" ] && rm -f /etc/udev/rules.d/80-networking.rules
udevlink=$(readlink /etc/udev/rules.d/60-bridge-network-interface.rules 2>/dev/null)
[ -n "$udevlink" -a "$udevlink" == "/dev/null" ] && rm -f /etc/udev/rules.d/60-bridge-network-interface.rules
if [ "$1" = "purge" ] ; then
update-rc.d networking remove >/dev/null
fi