diff options
| author | Michael Biebl <biebl@debian.org> | 2010-11-29 15:05:48 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2010-11-29 15:05:56 +0100 |
| commit | da2c055103fed8be9a72bd820a9424873bf651c4 (patch) | |
| tree | b541d17bf140c412f9365a7e8b65b3670c55bc44 | |
| parent | 00aad0b34da1a25f12315deec515a4bf32ee8090 (diff) | |
Don't try the interfaces migration if /etc/network/interfaces does not exist.
This avoids a failure on remove. (Closes: #605360)
| -rw-r--r-- | debian/changelog | 2 | ||||
| -rw-r--r-- | debian/network-manager.postinst | 6 | ||||
| -rw-r--r-- | debian/network-manager.postrm | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog index 1397f8f9..b60f2d33 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ network-manager (0.8.1-5) UNRELEASED; urgency=low * Update Vcs-* fields: Move packaging from svn to git. + * Don't try the interfaces migration if /etc/network/interfaces does not + exist. This avoids a failure on remove. (Closes: #605360) -- Michael Biebl <biebl@debian.org> Sun, 28 Nov 2010 23:47:41 +0100 diff --git a/debian/network-manager.postinst b/debian/network-manager.postinst index 6ef57ff7..87fee6ea 100644 --- a/debian/network-manager.postinst +++ b/debian/network-manager.postinst @@ -68,8 +68,10 @@ case "$1" in fi if [ -z "$2" ] || dpkg --compare-versions "$2" lt-nl "0.8.1-4"; then - echo "Disabling interfaces configured with plain DHCP in /etc/network/interfaces so that NetworkManager can take them over" - /usr/lib/NetworkManager/ifblacklist_migrate.sh + if [ -f /etc/network/interfaces ]; then + echo "Disabling interfaces configured with plain DHCP in /etc/network/interfaces so that NetworkManager can take them over" + /usr/lib/NetworkManager/ifblacklist_migrate.sh + fi fi ;; diff --git a/debian/network-manager.postrm b/debian/network-manager.postrm index cf67e431..f2c3ee0e 100644 --- a/debian/network-manager.postrm +++ b/debian/network-manager.postrm @@ -30,7 +30,9 @@ case "$1" in while test -e /etc/network/interfaces.bak-${backup_suffix}; do backup_suffix=$(($backup_suffix + 1)) done - sed -i.bak-${backup_suffix} -e "s/^#NetworkManager#//g" /etc/network/interfaces + if [ -f /etc/network/interfaces ]; then + sed -i.bak-${backup_suffix} -e "s/^#NetworkManager#//g" /etc/network/interfaces + fi ;; upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; |