X-Git-Url: https://code.delx.au/refind/blobdiff_plain/37c98e1a4e30f80d6a7f7158bc27c81a1c3cac37..a685467b7efc9a27ea7cf0318d35577b80c63356:/refind-install diff --git a/refind-install b/refind-install index 495892f..eaeddcd 100755 --- a/refind-install +++ b/refind-install @@ -40,7 +40,8 @@ # Revision history: # # 0.10.1 -- Improve extraction of default kernel options from /proc/cmdline. -# Add support for AMD64 (aka AARCH64, aa64) platform. +# Add support for AMD64 (aka AARCH64, aa64) platform. Added +# warning when --alldrivers used without --usedefault. # 0.10.0 -- Enable running under OS X's recovery system & add warning about # SIP & brief instructions on how to deal with it if SIP is # detected to be enabled. Also change way refind_linux.conf default @@ -181,6 +182,17 @@ GetParams() { echo "The --keepname option is incompatible with --usedefault! Aborting!" exit 1 fi + if [[ "$InstallDrivers" == "all" && "$TargetDir" != "/EFI/BOOT" ]] ; then + echo "The --alldrivers option is meant for creating USB flash drives with (near-)" + echo "universal boot support. Using it on a hard disk partition runs the risk of" + echo "creating serious problems, up to and including rendering your computer" + echo -n "unbootable. Are you SURE you want to proceed (Y/N)? " + ReadYesNo + if [[ "$YesNo" != "Y" && "$YesNo" != "y" ]] ; then + echo "Aborting installation!" + exit 0 + fi + fi RLConfFile="$RootDir/boot/refind_linux.conf" EtcKeysDir="$RootDir/etc/refind.d/keys" } # GetParams() @@ -988,12 +1000,12 @@ GenerateKeys() { # Sign a single binary. Requires parameters: # $1 = source file # $2 = destination file -# Also assumes that the SBSign, PESign, UseSBSign, UsePESign, and various key variables are set -# appropriately. +# Also assumes that the SBSign and various key variables are set appropriately. # Aborts script on error SignOneBinary() { - $SBSign --key "$PrivateKey" --cert "$CertKey" --output "$2" "$1" - if [[ $? != 0 ]] ; then + $SBSign --key "$PrivateKey" --cert "$CertKey" --output "$2" "$1" 2>&1 >/dev/null | \ + grep -v "data remaining.*gaps between PE/COFF sections" + if [[ "${PIPESTATUS[0]}" != 0 ]] ; then echo "Problem signing the binary $1! Aborting!" exit 1 fi