buildiso: add a geoip switch to profile.conf

This commit is contained in:
udeved 2016-09-11 23:16:59 +02:00
parent 8585bcbd86
commit a8f3356a35
4 changed files with 34 additions and 19 deletions

View file

@ -43,6 +43,9 @@
# configure calamares to use chrootcfg instead of unpackfs
# unpackfs="true"
# use geoip
# geoip="true"
# unset defaults to given value
# plymouth_theme=manjaro-elegant

View file

@ -156,6 +156,15 @@
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>geoip=</varname></term>
<listitem><para>Accepts
<option>true</option> (the default)
<option>false</option>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>efi_boot_loader=</varname></term>

View file

@ -254,16 +254,17 @@ write_mhwdcfg_conf(){
local conf="$1/etc/calamares/modules/mhwdcfg.conf"
msg2 "Writing %s ..." "${conf##*/}"
echo "---" > "$conf"
echo "bus:" >> "$conf"
echo " - pci" >> "$conf"
echo '' >> "$conf"
echo "identifier:" >> "$conf"
echo " net:" >> "$conf"
echo " - 200" >> "$conf"
echo " - 280" >> "$conf"
echo " video:" >> "$conf"
echo " - 300" >> "$conf"
echo '' >> "$conf"
echo "bus:" >> "$conf"
echo " - pci" >> "$conf"
echo " - usb" >> "$conf"
echo " - 302" >> "$conf"
echo " - 380" >> "$conf"
echo '' >> "$conf"
if ${nonfree_mhwd};then
echo "driver: nonfree" >> "$conf"
@ -335,19 +336,19 @@ write_netinstall_conf(){
echo "groupsUrl: ${netgroups}/$(get_yaml)" >> "$conf"
}
write_grubcfg_conf(){
local conf="$1/etc/calamares/modules/grubcfg.conf"
msg2 "Writing %s ..." "${conf##*/}"
echo "---" > "$conf"
echo "overwrite: false" >> "$conf"
echo '' >> "$conf"
echo "defaults:" >> "$conf"
echo " GRUB_TIMEOUT: 5" >> "$conf"
echo ' GRUB_DEFAULT: "saved"' >> "$conf"
echo " GRUB_DISABLE_SUBMENU: true" >> "$conf"
echo ' GRUB_TERMINAL_OUTPUT: "console"' >> "$conf"
echo " GRUB_DISABLE_RECOVERY: true" >> "$conf"
}
# write_grubcfg_conf(){
# local conf="$1/etc/calamares/modules/grubcfg.conf"
# msg2 "Writing %s ..." "${conf##*/}"
# echo "---" > "$conf"
# echo "overwrite: false" >> "$conf"
# echo '' >> "$conf"
# echo "defaults:" >> "$conf"
# echo " GRUB_TIMEOUT: 5" >> "$conf"
# echo ' GRUB_DEFAULT: "saved"' >> "$conf"
# echo " GRUB_DISABLE_SUBMENU: true" >> "$conf"
# echo ' GRUB_TERMINAL_OUTPUT: "console"' >> "$conf"
# echo " GRUB_DISABLE_RECOVERY: true" >> "$conf"
# }
write_plymouthcfg_conf(){
local conf="$1/etc/calamares/modules/plymouthcfg.conf"
@ -363,7 +364,7 @@ write_locale_conf(){
echo "region: America" >> "$conf"
echo "zone: New_York" >> "$conf"
echo "localeGenPath: /etc/locale.gen" >> "$conf"
echo "geoipUrl: freegeoip.net" >> "$conf"
${geoip} && echo "geoipUrl: freegeoip.net" >> "$conf"
}
configure_calamares(){
@ -401,7 +402,7 @@ configure_calamares(){
write_postcfg_conf "$1"
write_grubcfg_conf "$1"
# write_grubcfg_conf "$1"
write_services_conf "$1"
write_users_conf "$1"

View file

@ -457,6 +457,8 @@ load_profile_config(){
[[ -z ${netgroups} ]] && netgroups="https://raw.githubusercontent.com/manjaro/manjaro-tools-iso-profiles/master/shared/netinstall"
[[ -z ${geoip} ]] && geoip='true'
[[ -z ${smb_workgroup} ]] && smb_workgroup=''
check_profile_vars