Fix with compiler option 'freestanding'
[rrq/maintain_lilo.git] / hooks / initramfs / post-update.d / runlilo
1 #!/bin/sh
2 #
3 #  runlilo - postupdate script for modern initrd management
4 #
5 #  Copyright 2010 Joachim Wiedorn
6 #  All rights reserved.
7 #
8 #  Licensed under the terms contained in the file 'COPYING'
9 #  in the source directory.
10 #
11
12 set -e
13 PAR=ever
14
15 # check for maintainer param
16 if [ ! -z "${DPKG_MAINTSCRIPT_PACKAGE}" ]
17 then PAR="${DPKG_MAINTSCRIPT_PACKAGE}"; fi
18
19 case "$PAR" in
20
21   linux-image-*)
22     # lilo will be updated later by the kernel postinst hook.
23     # no need to update it now.
24     true
25     ;;
26
27   *)
28     # Run the boot loader installer
29     if [ -f /sbin/lilo ];then
30       if [ -f /etc/lilo.conf ];then
31         lilo  </dev/null  >&2
32       else
33         echo "Warning: Not updating LILO; /etc/lilo.conf not found!" >&2
34       fi
35     fi
36     ;;
37
38 esac
39
40 # end of file