X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=debian.in%2Fpostrm;h=30f451d8534f5e630645e504a85375ad05a18a19;hb=185ac8c0b94807a01f510f17f45d402f47add83a;hp=fdd7b35af60cda3b7e3fd628394ea0d59b842f52;hpb=173a4fab89b786e9f6cc2474860592336cae5d71;p=cp210x.git diff --git a/debian.in/postrm b/debian.in/postrm index fdd7b35..30f451d 100755 --- a/debian.in/postrm +++ b/debian.in/postrm @@ -1,7 +1,26 @@ -#! /bin/sh +#!/bin/sh + +NAME=xxPACKAGExx +VERSION=xxDEBVERxx set -e -if [ "$1" = "remove" ]; then - depmod -a -fi +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + depmod + if [ -d "/usr/src/$NAME-$VERSION" ]; then + echo "Removing old module source..." + rm -rf "/usr/src/$NAME-$VERSION" + fi + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 +