Skip to content

Commit

Permalink
Ensure .config exists before make -s kernelrelease
Browse files Browse the repository at this point in the history
  • Loading branch information
sakaki- committed Apr 4, 2017
1 parent 04fadaf commit 108b8e4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
27 changes: 15 additions & 12 deletions buildkernel
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ shopt -s nullglob
# ********************** variables *********************
PROGNAME="$(basename "${0}")"
CONFFILE="/etc/${PROGNAME}.conf"
VERSION="1.0.21"
VERSION="1.0.22"
ETCPROFILE="/etc/profile"
DEFAULTEFIBOOTFILE="bootx64.efi"
EFIBOOTFILE="${DEFAULTEFIBOOTFILE}"
Expand Down Expand Up @@ -1541,17 +1541,19 @@ copy_config_from_proc_if_necessary () {
# requires that the kernel has support for config in /proc
check_file_exists "${CURRENTCONFIG}"
zcat "${CURRENTCONFIG}" > "${TARGETCONFIG}"
if ((ARG_ASK==1)); then
show "Updating old config using make ${CONFIGUPDATETYPE}"
if [ "${CONFIGUPDATETYPE}" != "${SILENTUPDATETYPE}" ]; then
show "Please answer all questions as and if prompted..."
fi
make "${CONFIGUPDATETYPE}"
else
# non-interactive mode, so we have to go silent
show "Updating old config using make ${SILENTUPDATETYPE}"
make "${SILENTUPDATETYPE}"
fi
}
update_config_if_necessary() {
if ((ARG_ASK==1)); then
show "Updating old config using make ${CONFIGUPDATETYPE}"
if [ "${CONFIGUPDATETYPE}" != "${SILENTUPDATETYPE}" ]; then
show "Please answer all questions as and if prompted..."
fi
make "${CONFIGUPDATETYPE}"
else
# non-interactive mode, so we have to go silent
show "Updating old config using make ${SILENTUPDATETYPE}"
make "${SILENTUPDATETYPE}"
fi
}
conform_config_file() {
Expand Down Expand Up @@ -2118,6 +2120,7 @@ process_command_line_options() {

# *************** start of script proper ***************
suppress_colour_and_alert_if_output_not_to_a_terminal
copy_config_from_proc_if_necessary
extract_kernel_release_name
check_if_booted_under_efi
find_all_usb_partitions
Expand All @@ -2129,7 +2132,7 @@ check_gcc_config_and_reset_if_necessary
if_option_unset "ARG_STAGEONLY" ensure_efi_partition_mounted
if ((ARG_COPYFROMSTAGING==0)); then
enter_build_directory
copy_config_from_proc_if_necessary
update_config_if_necessary
conform_config_file
allow_user_to_modify_config_graphically
if_option_set "ARG_ASK" continue_yn "Now build a kernel with this new configuration"
Expand Down
2 changes: 1 addition & 1 deletion buildkernel.8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH BUILDKERNEL 8 "Version 1.0.21: March 2017"
.TH BUILDKERNEL 8 "Version 1.0.22: April 2017"
.SH NAME
buildkernel \- build secure boot kernel, save to EFI system partition
.SH SYNOPSIS
Expand Down
2 changes: 1 addition & 1 deletion buildkernel.conf.5
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH BUILDKERNEL 5 "Version 1.0.21: March 2017"
.TH BUILDKERNEL 5 "Version 1.0.22: April 2017"
.SH NAME
buildkernel.conf \- a configuration file for \fBbuildkernel\fR(8)
.SH SYNOPSIS
Expand Down

0 comments on commit 108b8e4

Please sign in to comment.