From 114d6df01b7b70657c145481638e7794cd3ec352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Wed, 18 Mar 2015 12:59:39 +0100 Subject: [PATCH] lilo: Make hooks less verbose --- srcpkgs/lilo/files/kernel.d/lilo.post-install | 10 ++++------ srcpkgs/lilo/files/kernel.d/lilo.post-remove | 8 +++++--- srcpkgs/lilo/template | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/srcpkgs/lilo/files/kernel.d/lilo.post-install b/srcpkgs/lilo/files/kernel.d/lilo.post-install index 63df21d568c..58fce923e62 100644 --- a/srcpkgs/lilo/files/kernel.d/lilo.post-install +++ b/srcpkgs/lilo/files/kernel.d/lilo.post-install @@ -4,12 +4,10 @@ # # Arguments passed to this script: $1 pkgname, $2 version. # +PKGNAME="$1" +VERSION="$2" [ -x "$(command -v lilo)" ] || \ - return 0 + exit 0 -if [ -e /etc/lilo.conf ]; then - lilo -elif [ ! -e /etc/lilo.conf ]; then - echo "Warning: Not updating LILO. Configuration file wasn't found." 1>&2 -fi +[ -f /etc/lilo.conf ] && lilo diff --git a/srcpkgs/lilo/files/kernel.d/lilo.post-remove b/srcpkgs/lilo/files/kernel.d/lilo.post-remove index 464d15731c9..9826229855e 100644 --- a/srcpkgs/lilo/files/kernel.d/lilo.post-remove +++ b/srcpkgs/lilo/files/kernel.d/lilo.post-remove @@ -4,9 +4,11 @@ # # Arguments passed to this script: $1 pkgname, $2 version. # +PKGNAME="$1" +VERSION="$2" [ -x "$(command -v lilo)" ] || \ - return 0 + exit 0 -# Do not abort in case of an error. -lilo || true +# Do not abort kernel removal on error. +[ -f /etc/lilo.conf ] && lilo || true diff --git a/srcpkgs/lilo/template b/srcpkgs/lilo/template index 46984d8e27a..e25c785c159 100644 --- a/srcpkgs/lilo/template +++ b/srcpkgs/lilo/template @@ -1,7 +1,7 @@ # Template file for 'lilo' pkgname=lilo version=24.1 -revision=4 +revision=5 only_for_archs="i686 x86_64" hostmakedepends="bin86" makedepends="device-mapper-devel"