util-iso-image: configure thus for sonar

This commit is contained in:
udeved 2016-12-01 17:00:48 +01:00 committed by Philip
parent 53b3ce5dc1
commit 83de201055

View file

@ -194,6 +194,29 @@ configure_system(){
esac 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(){ configure_live_image(){
msg "Configuring [live-image]" msg "Configuring [live-image]"
configure_hosts "$1" configure_hosts "$1"
@ -202,6 +225,7 @@ configure_live_image(){
configure_system "$1" configure_system "$1"
configure_services "$1" configure_services "$1"
configure_calamares "$1" configure_calamares "$1"
[[ ${edition} == "sonar" ]] && configure_thus "$1"
write_live_session_conf "$1" write_live_session_conf "$1"
msg "Done configuring [live-image]" msg "Done configuring [live-image]"
} }