@@ -20,6 +20,7 @@ defaultconfig="${script_path}/default.conf"
2020all_arch=(" x86_64" " i686" )
2121customized_username=false
2222customized_password=false
23+ customized_kernel=false
2324DEFAULT_ARGUMENT=" "
2425alteriso_version=" 3.0"
2526
@@ -480,6 +481,14 @@ prepare_build() {
480481 load_config " ${script_path} /channels/share/config.any" " ${script_path} /channels/share/config.${arch} "
481482 load_config " ${channel_dir} /config.any" " ${channel_dir} /config.${arch} "
482483
484+ # Set kernel
485+ if [[ " ${customized_kernel} " = false ]]; then
486+ kernel=" ${defaultkernel} "
487+ fi
488+
489+ eval $( bash " ${script_path} /tools/locale.sh" -s -a " ${arch} " get " ${locale_name} " )
490+ eval $( bash " ${script_path} /tools/kernel.sh" -s -a " ${arch} " get " ${kernel} " )
491+
483492 # Set dirs
484493 airootfs_dir=" ${work_dir} /${arch} /airootfs"
485494 isofs_dir=" ${work_dir} /iso"
@@ -1182,12 +1191,6 @@ make_iso() {
11821191 msg_info " The password for the live user and root is ${password} ."
11831192}
11841193
1185- # Parse files
1186- parse_files () {
1187- eval $( bash " ${script_path} /tools/locale.sh" -s -a " ${arch} " get " ${locale_name} " )
1188- eval $( bash " ${script_path} /tools/kernel.sh" -s -a " ${arch} " get " ${kernel} " )
1189- }
1190-
11911194# Parse options
11921195ARGUMENT=" ${@ } "
11931196_opt_short=" bc:deg:hjk:l:o:p:rt:u:w:x"
@@ -1232,6 +1235,7 @@ while :; do
12321235 msg_error " This option is obsolete in AlterISO 3. To use Japanese, use \" -l ja\" ." " 1"
12331236 ;;
12341237 -k | --kernel)
1238+ customized_kernel=true
12351239 kernel=" ${2} "
12361240 shift 2
12371241 ;;
@@ -1400,10 +1404,6 @@ if [[ ! "$(cat "${channel_dir}/alteriso" 2> /dev/null)" = "alteriso=${alteriso_v
14001404 fi
14011405fi
14021406
1403- for arch in ${all_arch[@]} ; do
1404- parse_files
1405- done
1406-
14071407set -eu
14081408
14091409prepare_env
0 commit comments