From 0d58bbc330b1406ecb561b81c324437a6a787a35 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 19 Mar 2016 12:08:07 +0000 Subject: inject calamares launcher on liveuser's desktop --- kogaionlive.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/kogaionlive.sh b/kogaionlive.sh index 9884933..47d201c 100755 --- a/kogaionlive.sh +++ b/kogaionlive.sh @@ -2,7 +2,7 @@ export local liveuser="kogaion" -checkroot () { +checkroot() { if [[ "$(whoami)" != root ]] ; then echo "No root, no play! Bye bye!" exit 1 @@ -26,11 +26,11 @@ kogaion_live_user_groups() { done } -kogaion_live_user_password () { +kogaion_live_user_password() { /usr/bin/passwd --delete "$liveuser" > /dev/null 2>&1 } -kogaion_live_locale_switch () { +kogaion_live_locale_switch() { export local keymap_toset="$(cat /proc/cmdline | cut -d " " -f12 | cut -d "=" -f2)" export local lang_toset="$(cat /proc/cmdline | cut -d " " -f13 | cut -d "=" -f2)" if [[ "$lang_toset" != "en_US.utf8" ]] || [[ "$keymap_toset" != "us" ]] ; then @@ -40,12 +40,18 @@ kogaion_live_locale_switch () { fi } +kogaion_live_installer_desktop() { + cp "/usr/share/applications/calamares.desktop" "/home/"$liveuser"/Desktop" + sed -i "s/"Name=Calamares"/"Name=Kogaion\ Installer"/g" "/home/"$liveuser"/Desktop/calamares.desktop" + chmod 755 "/home/"$liveuser"/Desktop/calamares.desktop" +} -main () { +main() { if checkroot && kogaion_is_live ; then kogaion_add_live_user kogaion_live_user_groups kogaion_live_user_password + kogaion_live_installer_desktop kogaion_live_locale_switch fi } -- cgit v1.2.3