#! /bin/sh #---------------------------------------------------------------------------- # /var/install/bin/verify-bootloader - check if boot configuration is valid # # Creation : 2008-08-14 tb # Last Update: $Id$ # # Copyright (c) 2001-@@YEAR@@ the eisfair team, team(at)eisfar(dot)org # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- . /var/install/include/eislib #----------------------------------------------------------------------------- # main program #----------------------------------------------------------------------------- main() { local lilo_error=$(/bin/mktemp -t lilo_error.XXXXXXXXXX) local lilo_message=$(/bin/mktemp -t lilo_message.XXXXXXXXXX) local result=0 /sbin/lilo -t 1>"${lilo_message}" 2>"${lilo_error}" if [ "$?" != 0 ] then echo mecho --error "Your lilo configuration is broken!" mecho --error "This is the output from the test with 'lilo -t':" mecho "$(cat ${lilo_message})" mecho --warn "$(cat ${lilo_error})" echo mecho --error "Please repair your lilo configuration!" echo result=1 fi rm -f "${lilo_error}" rm -f "${lilo_message}" exit ${result} } #----------------------------------------------------------------------------- # call function main #----------------------------------------------------------------------------- main "${@}" #----------------------------------------------------------------------------- # end #-----------------------------------------------------------------------------