rebuild=false
customized_username=false
customized_password=false
+customized_kernel=false
DEFAULT_ARGUMENT=""
alteriso_version="3.0"
_save_var defaultusername
_save_var customized_username
_save_var customized_password
+ _save_var customized_kernel
_write_rebuild_file "\n# mkalteriso Info"
_save_var mkalteriso
load_config "${script_path}/channels/share/config.any" "${script_path}/channels/share/config.${arch}"
load_config "${channel_dir}/config.any" "${channel_dir}/config.${arch}"
+ # Set kernel
+ if [[ "${customized_kernel}" = false ]]; then
+ kernel="${defaultkernel}"
+ fi
+
+ # Parse files
+ eval $(bash "${script_path}/tools/locale.sh" -s -a "${arch}" get "${locale_name}")
+ eval $(bash "${script_path}/tools/kernel.sh" -s -c "${channel_name}" -a "${arch}" get "${kernel}")
+
# Set username
if [[ "${customized_username}" = false ]]; then
username="${defaultusername}"
# Check kernel for each channel
#if [[ -f "${channel_dir}/kernel_list-${arch}" ]] && [[ -z $(cat "${channel_dir}/kernel_list-${arch}" | grep -h -v ^'#' | grep -x "${kernel}" 2> /dev/null) ]]; then
- if [[ ! "$(bash "${script_path}/tools/kernel.sh" -c "${channel_name}" -a "${arch}" -s check "${channel_name}")" = "correct" ]]; then
+ if [[ ! "$(bash "${script_path}/tools/kernel.sh" -c "${channel_name}" -a "${arch}" -s check "${kernel}")" = "correct" ]]; then
msg_error "This kernel is currently not supported on this channel or architecture" "1"
fi
msg_info "The password for the live user and root is ${password}."
}
-# Parse files
-parse_files() {
- eval $(bash "${script_path}/tools/locale.sh" -s -a "${arch}" get "${locale_name}")
- eval $(bash "${script_path}/tools/kernel.sh" -s -c "${channel_name}" -a "${arch}" get "${kernel}")
-}
-
# Parse options
ARGUMENT="${@}"
msg_error "This option is obsolete in AlterISO 3. To use Japanese, use \"-l ja\"." "1"
;;
-k | --kernel)
+ customized_kernel=true
kernel="${2}"
shift 2
;;
fi
fi
-parse_files
-
set -eu
prepare_env
# This setting cannot be changed by an argument.
noaur=true
-# kernel config
-_kernel_config_line=("core" "vmlinuz-linux" "linux")
-kernel="${_kernel_config_line[0]}"
-kernel_filename="${_kernel_config_line[1]}"
-kernel_mkinitcpio_profile="${_kernel_config_line[2]}"
+#-- kernel config --#
+# Set the kernel that live session use.
+# Please don't set anything if you want to use normal kernel.
+# See help for a list of available values.
+# This setting cannot be changed by an argument.
+
+# Kernel name
+defaultkernel="core"
# Use mkalteriso written in a traditional shell script
# instead of the C ++ version of mkalteriso.
# Set the kernel that live session use.
# Please don't set anything if you want to use normal kernel.
# See help for a list of available values.
-# Change the default behavior of "-k" and "--kernel".
+# This setting cannot be changed by an argument.
# Kernel name
-kernel="zen"
-
-# Kernel file name
-kernel_filename="vmlinuz-linux-zen"
-
-# mkinitcpio profile name (mkinitcpio -p <name>)
-kernel_mkinitcpio_profile="linux-zen"
-
+defaultkernel="zen"
#-- Live environment user --#