diff options
author | V3n3RiX <venerix@rogentos.ro> | 2016-03-19 12:08:07 +0000 |
---|---|---|
committer | V3n3RiX <venerix@rogentos.ro> | 2016-03-19 12:08:07 +0000 |
commit | 0d58bbc330b1406ecb561b81c324437a6a787a35 (patch) | |
tree | 87c8b4d234c6e34cd27ae0ae0008719228ee10b6 | |
parent | 9bd4831eb57024c4dc2b54482efdc4c617e4c719 (diff) |
inject calamares launcher on liveuser's desktop
-rwxr-xr-x | kogaionlive.sh | 14 |
1 files 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 } |