whereami does not uninstall cleanly

Bug #2044 reported by puff
6
Affects Status Importance Assigned to Milestone
whereami (Ubuntu)
Fix Released
Medium
Andrew McMillan

Bug Description

After using apt-get to install, then remove whereami, ifup/ifdown reports errors involving missing whereami scripts. Specifically, at the beginning and end of ifup's output:

run-parts: /etc/network/if-pre-up.d/whereami exited with return code 1
/etc/dhcp3/dhclient-exit-hooks.d/whereami: line 28: /usr/sbin/whereami: No such file or directory

Here's a log of the entire process:

puff@redbitter:~$ uname -a
Linux redbitter 2.6.10-5-686 #1 Thu Aug 18 22:39:14 UTC 2005 i686 GNU/Linux
puff@redbitter:~$ cat /etc/debian_version
3.1
puff@redbitter:~$ sudo apt-get install whereami
Reading package lists... Done
Building dependency tree... Done
Suggested packages:
  ifplugd resolvconf oops
The following NEW packages will be installed:
  whereami
0 upgraded, 1 newly installed, 0 to remove and 58 not upgraded.
Need to get 0B/61.1kB of archives.
After unpacking 438kB of additional disk space will be used.

Preconfiguring packages ...
Selecting previously deselected package whereami.
(Reading database ... 76297 files and directories currently installed.)
Unpacking whereami (from .../whereami_0.3.18_all.deb) ...
Setting up whereami (0.3.18) ...
Where Am I: Moving from undocked to lan

puff@redbitter:~$ sudo whereami
Continuing at lan
puff@redbitter:~$ sudo apt-get remove whereami
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED:
  whereami
0 upgraded, 0 newly installed, 1 to remove and 58 not upgraded.
Need to get 0B of archives.
After unpacking 438kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 76353 files and directories currently installed.)
Removing whereami ...
puff@redbitter:~$ sudo ifconfig
eth0 Link encap:Ethernet HWaddr 00:11:25:CE:F5:F0
          inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
          inet6 addr: fe80::211:25ff:fece:f5f0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:14848 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18024 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5306622 (5.0 MiB) TX bytes:2303272 (2.1 MiB)
          Interrupt:16

lo Link encap:Local Loopback
          inet addr:127.0.0.1 Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING MTU:16436 Metric:1
          RX packets:382697 errors:0 dropped:0 overruns:0 frame:0
          TX packets:382697 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:34960221 (33.3 MiB) TX bytes:34960221 (33.3 MiB)

puff@redbitter:~$ sudo ifdown eth0
Internet Systems Consortium DHCP Client V3.0.1
Copyright 2004 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP

sit0: unknown hardware address type 776
sit0: unknown hardware address type 776
Listening on LPF/eth0/00:11:25:ce:f5:f0
Sending on LPF/eth0/00:11:25:ce:f5:f0
Sending on Socket/fallback
DHCPRELEASE on eth0 to 192.168.1.1 port 67
puff@redbitter:~$ sudo ifup eth0
run-parts: /etc/network/if-pre-up.d/whereami exited with return code 1
Internet Systems Consortium DHCP Client V3.0.1
Copyright 2004 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP

sit0: unknown hardware address type 776
sit0: unknown hardware address type 776
Listening on LPF/eth0/00:11:25:ce:f5:f0
Sending on LPF/eth0/00:11:25:ce:f5:f0
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
DHCPOFFER from 192.168.1.1
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.1.1
/etc/dhcp3/dhclient-exit-hooks.d/whereami: line 28: /usr/sbin/whereami: No such file or directory
bound to 192.168.1.100 -- renewal in 39516 seconds.
puff@redbitter:~$

Revision history for this message
puff (puff) wrote :

I should point out, I'm not sure what the sit0 errors are about, but I do not have any reason to particularly suspect them to be related to whereami. Googling, I find discussions that seem to indicate it's part of IPv6. I wouldn't mind sorting out that error, but that's not the purpose of this bug report.

sit0: unknown hardware address type 776
sit0: unknown hardware address type 776

Changed in whereami:
assignee: nobody → motu
Revision history for this message
Emmet Hikory (persia) wrote :

The Debian maintainer suggests that all the hook files should include the test "test ! -e /usr/sbin/whereami && exit 1" prior to anything useful to ensure that these files exit invisibly when whereami is removed, but not purged. A patch would be welcomed, and applied to Debian in short order.

Revision history for this message
Andrew McMillan (karora) wrote :

Ah, well, what I thought I said was that there already was such a statement...

In fact, further reviewing the stuff above, I can see that while it is there for the /etc/network/*.d/whereami script, it's missing from the dhclient hook script, so that's where I need to add the line.

Regards,
Andrew.

Andrew McMillan (karora)
Changed in whereami:
assignee: motu → karora
status: Unconfirmed → Fix Committed
Changed in whereami:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.