base-files: update vkpurge for dracut, move to usr/sbin.

This commit is contained in:
Juan RP 2012-05-29 15:25:49 +02:00
parent 8f2369da55
commit 6b90435a98
2 changed files with 11 additions and 17 deletions

View file

@ -23,14 +23,15 @@ _EOF
list_kernels()
{
local k kpkg installed kver kvertmp skip
local k kpkg installed kver kvertmp skip _f
for k in /var/lib/initramfs-tools/*; do
kver=$(basename $k)
kvertmp=$(basename $k|sed -e 's|-rc|rc|')
for k in /boot/initramfs-*.img; do
_f=$(basename $k)
kver=$(xbps-uhelper getpkgversion ${_f})
kvertmp=$(xbps-uhelper getpkgversion ${_f}|sed -e 's|-rc|rc|')
for kpkg in kernel kernel-snapshot; do
installed=$(xbps-uhelper -r / version $kpkg)
if [ "$installed" = "$kvertmp" ]; then
if [ "$installed" = "${kvertmp%.img}" ]; then
skip=1
break
fi
@ -39,7 +40,7 @@ list_kernels()
unset skip
continue
fi
echo "$kver"
echo "${kver%.img}"
done
}
@ -88,11 +89,6 @@ remove_kernel()
fi
# Execute post-remove kernel hooks.
run_hooks post-remove $rmkver
# Make sure there are no stale files.
if [ -f /var/lib/initramfs-tools/${rmkver} ]; then
rm -f /var/lib/initramfs-tools/${rmkver}
fi
}
if [ "$1" = "list" ]; then

View file

@ -1,6 +1,8 @@
# Template file for 'base-files'
pkgname=base-files
version=0.62
version=0.63
noarch=yes
bootstrap=yes
fulldepends="base-directories xbps-triggers"
short_desc="Void GNU/Linux base system files"
maintainer="Juan RP <xtraeme@gmail.com>"
@ -10,9 +12,6 @@ long_desc="
This package installs the base system files that aren't installed by any
other package and are required on any GNU/Linux system."
noarch=yes
bootstrap=yes
conf_files="
/etc/inputrc
/etc/profile
@ -25,7 +24,6 @@ conf_files="
/etc/skel/.inputrc
/etc/issue"
do_install() {
# Install misc config files.
for f in bash_logout bash_profile bashrc inputrc; do
@ -49,5 +47,5 @@ do_install() {
install -m644 ${FILESDIR}/licenses/* ${DESTDIR}/usr/share/licenses
# vkpurge
vinstall ${FILESDIR}/vkpurge 755 sbin vkpurge
vinstall ${FILESDIR}/vkpurge 755 usr/sbin vkpurge
}