Flavour settings for KDE
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

kde-cheatcodes 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #!/bin/sh
  2. PATH=/sbin:/usr/sbin:/bin:/usr/bin
  3. NAME="kde-cheatcodes"
  4. if [ -r /etc/default/distro ]; then
  5. . /etc/default/distro
  6. fi
  7. . /lib/lsb/init-functions
  8. . /lib/init/fll
  9. if [ -r /etc/default/fll-locales ]; then
  10. . /etc/default/fll-locales
  11. fi
  12. FLL_LIVE_USER_HOME=$(getent passwd ${FLL_LIVE_USER} | cut -d \: -f 6)
  13. timedatectl set-timezone $(timedatectl | awk '/Local/{printf $6}')
  14. ###
  15. # cheatcode handling
  16. ###
  17. for param in $(cat /proc/cmdline); do
  18. case "${param}" in
  19. flldebug=*)
  20. if [ "${param#flldebug=}" = "${NAME}" ] || [ "${param#flldebug=}" = "all" ]; then
  21. fll_redirect
  22. fi
  23. ;;
  24. nointro)
  25. NOINTRO="nointro"
  26. ;;
  27. esac
  28. done
  29. no_intro() {
  30. if [ -z "${NOINTRO}" ] ; then
  31. [ ! -f ${FLL_LIVE_USER_HOME}/.kde/Autostart/${FLL_DISTRO_NAME}.desktop ] && sudo -u ${FLL_LIVE_USER} ln -sf "${FLL_LIVE_USER_HOME}/Desktop/${FLL_DISTRO_NAME}.desktop" \
  32. "${FLL_LIVE_USER_HOME}/.kde/Autostart/"
  33. elif [ -e "${FLL_LIVE_USER_HOME}/.kde/Autostart/${FLL_DISTRO_NAME}.desktop" ]; then
  34. # toram + persistency
  35. rm -f "${FLL_LIVE_USER_HOME}/.kde/Autostart/${FLL_DISTRO_NAME}.desktop"
  36. fi
  37. }
  38. do_start() {
  39. if [ -f ${FLL_LIVE_USER_HOME}/Desktop/${FLL_DISTRO_NAME}.desktop ]; then
  40. no_intro
  41. fi
  42. }
  43. case "${1}" in
  44. start)
  45. log_daemon_msg "${NAME}"
  46. do_start
  47. log_end_msg "${?}"
  48. ;;
  49. stop)
  50. ;;
  51. restart|force-reload)
  52. echo "Error: argument '${1}' not supported" >&2
  53. exit 3
  54. ;;
  55. *)
  56. echo "Usage: ${NAME} {start|stop}" >&2
  57. exit 3
  58. ;;
  59. esac