Removing package leaves motd script in place, renders incorrect motd

Bug #1707290 reported by Andreas Hasenack
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-advantage-script
Fix Released
Unknown
ubuntu-advantage-tools (Ubuntu)
Invalid
Low
Lucas Albuquerque Medeiros de Moura

Bug Description

Removing the ubuntu-advantage-tools package (not purging: removing) will leave the /etc/update-motd.d/99-esm script in place. Accordingly, it will run at login time, but since it calls out to the ubuntu-advantage script that no longer exists, it fails.

This is the sequence of events:
- ubuntu-advantage-tools is installed
- sudo ubuntu-advantage enable-esm with a valid token is run
- logout and login, confirming that the MOTD says something like "This Ubuntu 12.04 system is configured to receive extended security updates"
- remove (not purge) the ubuntu-advantage package. This will leave the sources.list.d/ file with the ESM repository in place and working, but remove the ubuntu-advantage script
- logout and login. The MOTD will now say "This Ubuntu 12.04 LTS system is past its End of Life", even though the ESM repository is still enabled and functioning.

Changed in ubuntu-advantage-script:
status: Unknown → New
Changed in ubuntu-advantage-tools (Ubuntu):
status: New → Triaged
Changed in ubuntu-advantage-script:
status: New → Fix Released
Changed in ubuntu-advantage-tools (Ubuntu):
assignee: nobody → Lucas Albuquerque Medeiros de Moura (lamoura)
Revision history for this message
Lucas Albuquerque Medeiros de Moura (lamoura) wrote :

We no longer ship the 99-esm file, so we shouldn't be affected by this issue anymore.
Additionally, I have double checked the new update-motd scripts we deliver and I can confirm they will not break the system if the user just removes the packages, since we have a check that prevent invalid files from being read, for example, this is the output of our 88-esm-announce script:

```
#!/bin/sh
stamp="/var/lib/ubuntu-advantage/messages/motd-esm-announce"

[ ! -r "$stamp" ] || cat "$stamp"
```

Because of that, I am marking this bug as invalid for the current version of UA.

Changed in ubuntu-advantage-tools (Ubuntu):
status: Triaged → Invalid
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.