#! /usr/bin/sh

# Settings from /etc/sysconfig/filename are available as environment vars
# with the name 'SYS__FILENAME__KEY' (filename converted to upper case).
#
# Not all files are parsed, current list is:
#   bootloader, language
#

# include common functions
. "$PBL_INCLUDE/library"

if [ -x /usr/bin/sdbootutil ] ; then
  ( set -x ; sdbootutil update-all-entries ) || err=1
elif [ -x /usr/bin/kernel-install ] ; then
  ( set -x ; kernel-install add-all ) || err=1
else
  echo "Found neither sdbootutil nor kernel-install"
  err=1
fi
