From 6dab476f7bee88f45454cd7e3ef2801bcb19af8b Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Sat, 3 Oct 2009 08:58:00 +0200
Subject: [PATCH] xbps-base-files: an improvement to previous commit.

Also update the initramfs of all kernels while removing a
package != kernel. Bump to 0.24.

--HG--
extra : convert_revision : 13bbba2d34c4ae6a0e678df6e1a1cc79fa7185a6
---
 templates/xbps-base-files/template | 2 +-
 triggers/initramfs-tools           | 8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/templates/xbps-base-files/template b/templates/xbps-base-files/template
index b88d8130e06..0bd0f04bc28 100644
--- a/templates/xbps-base-files/template
+++ b/templates/xbps-base-files/template
@@ -1,6 +1,6 @@
 # Template file for 'xbps-base-files'
 pkgname=xbps-base-files
-version=0.23
+version=0.24
 build_style=custom-install
 short_desc="xbps base system files"
 maintainer="Juan RP <xtraeme@gmail.com>"
diff --git a/triggers/initramfs-tools b/triggers/initramfs-tools
index 6d26b54fab7..a22b5b36e35 100755
--- a/triggers/initramfs-tools
+++ b/triggers/initramfs-tools
@@ -5,7 +5,7 @@
 # installed kernel otherwise.
 #
 # Arguments:	$1 = action [run/targets]
-#		$2 = target [post-install]
+#		$2 = target [post-install/post-remove]
 #		$3 = pkgname
 #		$4 = version
 #
@@ -18,15 +18,17 @@ update_initramfs=usr/sbin/update-initramfs
 
 case "$ACTION" in
 targets)
-	echo "post-install"
+	echo "post-install post-remove"
 	;;
 run)
 	[ ! -x ${update_initramfs} ] && exit 0
-	[ "$TARGET" != "post-install" ] && exit 1
 
 	initramfs_args="update-initramfs"
 
 	if [ "$PKGNAME" = "kernel" ]; then
+		if [ "$TARGET" = "post-remove" ]; then
+			exit 0
+		fi
 		if [ ! -f var/lib/initramfs-tools/${VERSION} ]; then
 			# Create new initramfs
 			initramfs_args="-c -k ${VERSION}"