1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
#! /bin/sh
# -*- Mode: Sh -*-
# image.preinst ---
# Author : Manoj Srivastava ( srivasta@tiamat.datasync.com )
# Created On : Sun Jun 14 03:38:02 1998
# Created On Node : tiamat.datasync.com
# Last Modified By : Manoj Srivastava
# Last Modified On : Tue Jul 14 14:13:16 1998
# Last Machine Used: tiamat.datasync.com
# Update Count : 21
# Status : Unknown, Use with caution!
# HISTORY :
# Description :
#
#
# check for and offer to abort if the modules dir already exists.
set -e
version="=V";
if [ "X$version" = "X" ]; then
echo >&2 "Pre inst Internal error. Aborting."
exit 1;
fi
# This script is called before this version of this package is installed.
# When this script is called, the package's files have not been unpacked
# yet.
case "$1" in
install|upgrade)
# About to upgrade this package from version $2 TO THIS VERSION.
# "prerm upgrade" has already been called for the old version of
# this package.
if [ -d /lib/modules/$version ]; then
echo >&2 "You are attempting to install a kernel image (version $version)"
echo >&2 "However, the directory /lib/modules/$version still exists."
echo >&2 "If you have deselected some modules, this could be bad."
echo >&2 ""
echo >&2 "This is your last chance to abort the installation of this"
echo >&2 "kernel image (nothing has been changed yet). "
echo >&2 ""
echo >&2 "I suggest you move /lib/modules/$version out of the way,"
echo >&2 "perhaps to /lib/modules/$version.old or something,"
echo >&2 "and then try re-installing this image."
echo >&2 ""
echo -n >&2 "Do you want to stop now? [Y/n] "
read ans;
case $ans in
[Nn]*)
:
;;
*)
echo >&2 "Ok, Aborting"
exit 1;
;;
esac
fi
;;
abort-upgrade)
# Back out of an attempt to upgrade this package FROM THIS VERSION to
# version $2. Undo the effects of "postrm upgrade $2".
# since we do not have a postrm, we need do nothing.
:
;;
*) echo "$0: didn't understand being called with \`$1'" 1>&2
exit 1;;
esac
|