Making apt-get powercut-proof

Andrew Sayers andrew-ubuntu-devel at pileofstuff.org
Thu May 15 14:19:57 UTC 2008


If you're amenable to extra scripts being suggested, I'll submit a bug
report(s) as and when it's relevant.

You're right about requiring a user choice, but I'm a bit concerned that
users are going to be confronted with a collection of options that they
don't understand, where one of them is known to be the right choice, but
they have to poke about until they find it.  How would you feel about
adding a mechanism to do a quick check before showing the menu, then
putting "(recommended)" next to one of the choices?

In the case of the current choices, my suggestion would be that fsck be
recommended if `touch /` returns false (i.e. read-only root filesystem,
even if /etc/mtab denies it), else dpkg is recommended if apt or dpkg
lock files exist (I assume they use lock files?), else xfix is
recommended (it uses dpkg, so can't be run until dpkg is happy).  The
root shell would never be recommended, because people that want a shell
don't need to be told.

If you're happy with this idea, I can submit a skeleton implementation
if you'd like.

	- Andrew




More information about the Ubuntu-devel-discuss mailing list