- if [ -f ${work_dir}/airootfs/root/customize_airootfs.sh ]; then
- run_cmd /root/customize_airootfs.sh
- fi
- run_cmd truncate -s 0 /etc/machine-id
+ # customize_airootfs options
+ # -b : Enable boot splash.
+ # -d : Enable debug mode.
+ # -g <locale_gen_name> : Set locale-gen.
+ # -i <inst_dir> : Set install dir
+ # -k <kernel config line> : Set kernel name.
+ # -o <os name> : Set os name.
+ # -p <password> : Set password.
+ # -s <shell> : Set user shell.
+ # -t : Set plymouth theme.
+ # -u <username> : Set live user name.
+ # -x : Enable bash debug mode.
+ # -r : Enable rebuild.
+ # -z <locale_time> : Set the time zone.
+ # -l <locale_name> : Set language.
+ #
+ # -j is obsolete in AlterISO3 and cannot be used.
+ # -k changed in AlterISO3 from passing kernel name to passing kernel configuration.
+ local _airootfs_script_options _run_script
+ _airootfs_script_options="-p ${liveuser_password} -u ${liveuser_name} -o ${os_name} -s ${liveuser_shell} -a ${arch} -g ${locale_gen_name} -l ${locale_name} -z ${locale_time} "
+
+ _run_script() {
+ local _file
+ for _file in ${@}; do
+ if [[ -f "${work_dir}/airootfs${_file}" ]]; then run_cmd "${_file}" ${_airootfs_script_options}; fi
+ if [[ -f "${work_dir}/airootfs${_file}" ]]; then chmod 755 "${work_dir}/airootfs${_file}"; fi
+ done
+ }
+
+ _run_script "/root/customize_airootfs.sh" "/root/customize_airootfs_${channel_name}.sh"