forked from mirrored-repos/manjaro-tools
util-iso-calamares: Always create configuration files for thus and calamares, even if they are not installed.
This commit is contained in:
parent
f30b2f4a32
commit
38e1e1f9eb
1 changed files with 37 additions and 43 deletions
|
@ -116,19 +116,16 @@ write_calamares_users_conf(){
|
|||
|
||||
brand_calamares_settings_conf(){
|
||||
local conf="$1/usr/share/calamares/settings.conf"
|
||||
local branding="$1/usr/share/calamares/branding/${iso_name}-${custom}"
|
||||
if [[ -d $branding ]];then
|
||||
if [[ -f $conf ]];then
|
||||
if [[ -d $1/usr/share/calamares/branding/${iso_name}-${custom} ]];then
|
||||
sed -i -e "s|^.*branding:.*|branding: ${iso_name}-${custom}|" "$conf"
|
||||
else
|
||||
local branding="$1/usr/share/calamares/branding/${iso_name}"
|
||||
if [[ -d $branding ]];then
|
||||
elif [[ -d $1/usr/share/calamares/branding/${iso_name} ]];then
|
||||
sed -i -e "s|^.*branding:.*|branding: ${iso_name}|" "$conf"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
configure_calamares(){
|
||||
if [[ -f $1/usr/bin/calamares ]];then
|
||||
msg2 "Configuring Calamares ..."
|
||||
mkdir -p $1/etc/calamares/modules
|
||||
write_calamares_bootloader_conf $1
|
||||
|
@ -143,14 +140,12 @@ configure_calamares(){
|
|||
write_calamares_services_conf $1
|
||||
write_calamares_users_conf $1
|
||||
|
||||
if [[ -f $1/usr/bin/kdesu ]];then
|
||||
if [[ -f $1/usr/share/applications/calamares.desktop && -f $1/usr/bin/kdesu ]];then
|
||||
sed -i -e 's|sudo|kdesu|g' $1/usr/share/applications/calamares.desktop
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
configure_thus(){
|
||||
if [[ -f $1/usr/bin/thus ]];then
|
||||
msg2 "Configuring Thus ..."
|
||||
source "$1/etc/mkinitcpio.d/${kernel}.preset"
|
||||
local conf="$1/etc/thus.conf"
|
||||
|
@ -168,8 +163,7 @@ configure_thus(){
|
|||
echo "INITRAMFS = \"$(echo ${default_image} | sed s'|/boot/||')\"" >> "$conf"
|
||||
echo "FALLBACK = \"$(echo ${fallback_image} | sed s'|/boot/||')\"" >> "$conf"
|
||||
|
||||
if [[ -f $1/usr/bin/kdesu ]];then
|
||||
if [[ -f $1/usr/share/applications/thus.desktop && -f $1/usr/bin/kdesu ]];then
|
||||
sed -i -e 's|sudo|kdesu|g' $1/usr/share/applications/thus.desktop
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue