#!/bin/sh #-------------------------------------------------------------------- # Copyright (C) 2003 by Mandriva, # Juan Quintela , # Redistribution of this file is permitted under the terms of the GNU # Public License (GPL) #-------------------------------------------------------------------- # $Id: kernel_remove_initrd 31366 2006-05-11 12:45:38Z tvignaud $ #-------------------------------------------------------------------- ## description: # Remove initrd at uninstall time function usage () { cat << EOF >&2 Usage: ${0##*/} KERNEL_VERSION [BOOTDIR] removes initrd for that kernel version if it exists. EOF exit 2 } version=$1 if [[ -z "$version" ]];then usage; fi [[ -n $2 ]] && boot=$2 || boot=/boot cd $boot if [ -f initrd-${version}.img ];then rm -f initrd-${version}.img fi exit 0