[util{-yaml}] add oem_used function

This commit is contained in:
Philip 2017-08-12 17:25:38 +01:00
parent 21deb78026
commit ed0903bf3f
2 changed files with 37 additions and 10 deletions

View file

@ -281,10 +281,18 @@ write_settings_conf(){
echo "sequence:" >> "$conf" echo "sequence:" >> "$conf"
echo " - show:" >> "$conf" echo " - show:" >> "$conf"
echo " - welcome" >> "$conf" && write_welcome_conf echo " - welcome" >> "$conf" && write_welcome_conf
echo " - locale" >> "$conf" && write_locale_conf if ${oem_used};then
echo " - keyboard" >> "$conf" msg2 "Skipping to show locale and keyboard modules."
else
echo " - locale" >> "$conf" && write_locale_conf
echo " - keyboard" >> "$conf"
fi
echo " - partition" >> "$conf" echo " - partition" >> "$conf"
echo " - users" >> "$conf" && write_users_conf if ${oem_used};then
msg2 "Skipping to show users module."
else
echo " - users" >> "$conf" && write_users_conf
fi
if ${netinstall};then if ${netinstall};then
echo " - netinstall" >> "$conf" && write_netinstall_conf echo " - netinstall" >> "$conf" && write_netinstall_conf
fi fi
@ -307,17 +315,28 @@ write_settings_conf(){
fi fi
echo " - machineid" >> "$conf" && write_machineid_conf echo " - machineid" >> "$conf" && write_machineid_conf
echo " - fstab" >> "$conf" echo " - fstab" >> "$conf"
echo " - locale" >> "$conf" if ${oem_used};then
echo " - keyboard" >> "$conf" msg2 "Skipping to set locale, keyboard and localecfg modules."
echo " - localecfg" >> "$conf" else
echo " - locale" >> "$conf"
echo " - keyboard" >> "$conf"
echo " - localecfg" >> "$conf"
fi
echo " - luksopenswaphookcfg" >> "$conf" echo " - luksopenswaphookcfg" >> "$conf"
echo " - luksbootkeyfile" >> "$conf" echo " - luksbootkeyfile" >> "$conf"
echo " - initcpiocfg" >> "$conf" echo " - initcpiocfg" >> "$conf"
echo " - initcpio" >> "$conf" && write_initcpio_conf echo " - initcpio" >> "$conf" && write_initcpio_conf
echo " - users" >> "$conf" if ${oem_used};then
msg2 "Skipping to set users module."
echo " - oemuser" >> "$conf"
else
echo " - users" >> "$conf"
fi
echo " - displaymanager" >> "$conf" && write_displaymanager_conf echo " - displaymanager" >> "$conf" && write_displaymanager_conf
if ${mhwd_used};then if ${mhwd_used};then
echo " - mhwdcfg" >> "$conf" && write_mhwdcfg_conf echo " - mhwdcfg" >> "$conf" && write_mhwdcfg_conf
else
msg2 "Skipping to set mhwdcfg module."
fi fi
echo " - hwclock" >> "$conf" echo " - hwclock" >> "$conf"
case ${initsys} in case ${initsys} in
@ -326,7 +345,11 @@ write_settings_conf(){
esac esac
echo " - grubcfg" >> "$conf" echo " - grubcfg" >> "$conf"
echo " - bootloader" >> "$conf" && write_bootloader_conf echo " - bootloader" >> "$conf" && write_bootloader_conf
echo " - postcfg" >> "$conf" && write_postcfg_conf if ${oem_used};then
msg2 "Skipping to set postcfg module."
else
echo " - postcfg" >> "$conf" && write_postcfg_conf
fi
echo " - umount" >> "$conf" echo " - umount" >> "$conf"
echo " - show:" >> "$conf" echo " - show:" >> "$conf"
echo " - finished" >> "$conf" && write_finished_conf echo " - finished" >> "$conf" && write_finished_conf

View file

@ -183,7 +183,9 @@ load_vars() {
} }
prepare_dir(){ prepare_dir(){
[[ ! -d $1 ]] && mkdir -p $1 if [[ ! -d $1 ]];then
mkdir -p $1
fi
} }
# $1: chroot # $1: chroot
@ -420,6 +422,8 @@ load_profile_config(){
[[ -z ${mhwd_used} ]] && mhwd_used='true' [[ -z ${mhwd_used} ]] && mhwd_used='true'
[[ -z ${oem_used} ]] && oem_used='false'
[[ -z ${chrootcfg} ]] && chrootcfg='false' [[ -z ${chrootcfg} ]] && chrootcfg='false'
netgroups="https://raw.githubusercontent.com/manjaro/calamares-netgroups/master" netgroups="https://raw.githubusercontent.com/manjaro/calamares-netgroups/master"