diff --git a/lib/util-iso-image.sh b/lib/util-iso-image.sh index 1cc9ce9..ee3c7a6 100644 --- a/lib/util-iso-image.sh +++ b/lib/util-iso-image.sh @@ -194,6 +194,29 @@ configure_system(){ esac } +configure_thus(){ + msg2 "Configuring Thus ..." + source "$1/etc/mkinitcpio.d/${kernel}.preset" + local conf="$1/etc/thus.conf" + echo "[distribution]" > "$conf" + echo "DISTRIBUTION_NAME = \"${dist_name} Linux\"" >> "$conf" + echo "DISTRIBUTION_VERSION = \"${dist_release}\"" >> "$conf" + echo "SHORT_NAME = \"${dist_name}\"" >> "$conf" + echo "[install]" >> "$conf" + echo "LIVE_MEDIA_SOURCE = \"/bootmnt/${iso_name}/${target_arch}/root-image.sfs\"" >> "$conf" + echo "LIVE_MEDIA_DESKTOP = \"/bootmnt/${iso_name}/${target_arch}/desktop-image.sfs\"" >> "$conf" + echo "LIVE_MEDIA_TYPE = \"squashfs\"" >> "$conf" + echo "LIVE_USER_NAME = \"${username}\"" >> "$conf" + echo "KERNEL = \"${kernel}\"" >> "$conf" + echo "VMLINUZ = \"$(echo ${ALL_kver} | sed s'|/boot/||')\"" >> "$conf" + echo "INITRAMFS = \"$(echo ${default_image} | sed s'|/boot/||')\"" >> "$conf" + echo "FALLBACK = \"$(echo ${fallback_image} | sed s'|/boot/||')\"" >> "$conf" + + 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 +} + configure_live_image(){ msg "Configuring [live-image]" configure_hosts "$1" @@ -202,6 +225,7 @@ configure_live_image(){ configure_system "$1" configure_services "$1" configure_calamares "$1" + [[ ${edition} == "sonar" ]] && configure_thus "$1" write_live_session_conf "$1" msg "Done configuring [live-image]" }