Make linux optional as all other configs.
[syslinux-debian/hramrach.git] / debian / local / extlinux-update
blobdf3db390bbf12a513a83b6c98670be4e20ce89c0
1 #!/bin/sh
3 ## Copyright (C) 2006-2013 Daniel Baumann <mail@daniel-baumann.ch>
4 ##
5 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
6 ## This is free software, and you are welcome to redistribute it
7 ## under certain conditions; see COPYING for details.
10 set -e
12 # User is unprivileged
13 if [ "$(id -u)" -ne 0 ]
14 then
15 echo "E: need root privileges"
16 exit 1
19 # Redirect stdout to stderr due Debconf usage
20 exec 1>&2
22 # Reading the default file
23 if [ -e /etc/default/extlinux ]
24 then
25 . /etc/default/extlinux
28 EXTLINUX_UPDATE="${EXTLINUX_UPDATE:-true}"
30 if [ "${EXTLINUX_UPDATE}" != "true" ]
31 then
32 echo "P: extlinux-update is disabled in /etc/default/extlinux."
34 exit 0
37 # Running /etc/extlinux.d scripts
38 for _FILE in /etc/extlinux.d/*
40 if [ -x "${_FILE}" ]
41 then
42 "${_FILE}"
44 done