#!/bin/sh set -e dupdaemonhelp () { cat </dev/null | awk '{print $1}'`" != \ "`ls -Li $h 2>/dev/null | awk '{print $1}'`" ] then continue fi removes="$removes rc$f.d/$g" done done if [ -n "$removes" ] then cd /etc dupdaemonhelp while [ -n "$removes" ] do echo -n 'y=remove, n=leave, l=list, h=help ? ' read response case "$response" in [Yy]*) echo "Removing duplicate K links ..." rm -v $removes removes="" ;; [Nn]*) echo -e "OK, leaving them.\n" removes="" ;; [Ll]*) echo echo $removes echo ;; [Hh]*) dupdaemonhelp ;; esac done fi ;; 1.1.6 | 1.1.6elf | 1.2.[0123] | 1.2.[0123]elf ) response='' while [ -z "$response" ]; do echo -n ' The version of dpkg you'\''re upgrading from had a problem with the install-info program used to maintain the /usr/info/dir file. It may have corrupted the file, for example by placing new entries for the menu in it before the `* Menu'\'' line (thus making them ineffective) or by creating several identical sections. I can try to sort these problems out, but beware that this process is not guaranteed not to mess up a dir file which has things that look like menu entries in the introductory paragraphs. The distributed dir files do not do this, so if you haven'\''t edited /usr/info/dir it'\''s almost certainly safe to say `yes'\'' to the next question. If you say `no'\'' you may wish to check and/or edit /usr/info/dir yourself. Try to check/repair /usr/info/dir automatically ? [y/n] ' read response case "$response" in [Yy]* | '') response=yes ;; [Nn]*) response=no ;; *) response='' ;; esac done if [ "$response" = yes ]; then echo " Checking/repairing /usr/info/dir ..." cleanup-info --unsafe echo else echo " OK. " fi ;; esac fi if [ -d /usr/info -a ! -L /usr/info -a ! -L /usr/info/dir ]; then echo Moving /usr/info/dir to /usr/share/info/dir. mv /usr/info/dir /usr/share/info/dir if [ -f /usr/info/dir.old ]; then mv /usr/info/dir.old /usr/share/info/dir.old fi if [ "`find /usr/info -empty`" = "/usr/info" ]; then echo Making /usr/info a symlink to /usr/share/info. rmdir /usr/info ln -s share/info /usr/info else echo Making /usr/info/dir a symlink to /usr/share/info/dir. ln -sf ../share/info/dir /usr/info/dir fi fi cd /var/lib/dpkg for f in diversions statoverride status ; do if [ ! -f "$f" ] ; then touch "$f" fi done