#!/bin/sh # # Kernel hook for LILO. # # Arguments passed to this script: $1 pkgname, $2 version. # PKGNAME="${1}" VERSION="${2}" boot="${ROOTDIR}/boot" etc="${ROOTDIR}/etc" entries="${etc}/lilo.d" name="void-${VERSION}" entry="${entries}/${name}.conf" [ -d "${boot}" ] && [ -d "${etc}" ] || exit 0 rm -f "${entry}" # No default entry if the removed one was the default sed "/^default=${name}\$/d" -i "${entries}/default.conf" conf="$(mktemp)" cat "${etc}/lilo.conf" "${entries}"/*.conf > "${conf}" [ -x "$(command -v lilo)" ] && \ lilo -C "${conf}" # Remove temporary config file rm -f "${conf}"