#!/bin/sh Hotfixes () { if [ -e /var/lib/live/config/hotfixes ] then return fi echo -n " hotfixes" Configure_hotfixes } Configure_hotfixes () { # Reading kernel command line for _PARAMETER in ${_CMDLINE} ${LIVE_CONFIG_CMDLINE}; do case "${_PARAMETER}" in live-config.timezone=*|timezone=*) LIVE_TIMEZONE="${_PARAMETER#*timezone=}" ;; live-config.username=*|username=*) LIVE_USERNAME="${_PARAMETER#*username=}" ;; esac done # fix timezone if [ -n "${LIVE_TIMEZONE}" ]; then echo "${LIVE_TIMEZONE}" > /etc/timezone fi # dirty hack to prevent kdm's "abort active sessions" prompt on live system sudo -u "${LIVE_USERNAME}" sh -c "mkdir -p /home/${LIVE_USERNAME}/.kde/shutdown; cat > /home/${LIVE_USERNAME}/.kde/shutdown/kdm-force-shutdown-hack" <<"EOF" #!/bin/sh # dirty hack to prevent kdm's "abort active sessions" prompt on live system . /etc/default/distro [ "$FLL_DISTRO_MODE" = "live" ] || exit # are we live? # "destroy" utmp, so kdm won't recognize the running logins on the other TTYs sudo perl -pi -e 's/tty/xty/g' /var/run/utmp EOF chmod +x /home/${LIVE_USERNAME}/.kde/shutdown/kdm-force-shutdown-hack # google chrome hack if [ -x /var/lib/dpkg/info/google-chrome-stable.postinst ]; then cat </etc/apt/sources.list.d/google-chrome.list ### THIS FILE IS AUTOMATICALLY CONFIGURED ### # You may comment out this entry, but any other modifications may be lost. deb http://dl.google.com/linux/chrome/deb/ stable main EOT fi # google earth hack if [ -x /var/lib/dpkg/info/google-earth-stable.postinst ]; then cat </etc/apt/sources.list.d/google-earth.list ### THIS FILE IS AUTOMATICALLY CONFIGURED ### # You may comment out this entry, but any other modifications may be lost. deb http://dl.google.com/linux/earth/deb/ stable main EOT fi # google talkplugin hack if [ -x /var/lib/dpkg/info/google-talkplugin.postinst ]; then cat </etc/apt/sources.list.d/google-talkplugin.list ### THIS FILE IS AUTOMATICALLY CONFIGURED ### # You may comment out this entry, but any other modifications may be lost. deb http://dl.google.com/linux/talkplugin/deb/ stable main EOT fi # steam list hack if [ -x /var/lib/dpkg/info/steam-launcher.postinst ]; then cat </etc/apt/sources.list.d/steam.list deb [arch=amd64,i386] http://repo.steampowered.com/steam/ precise steam deb-src [arch=amd64,i386] http://repo.steampowered.com/steam/ precise steam EOT fi # reconfigure console-setup rm -f /etc/default/console-setup . /etc/default/locale dpkg-reconfigure console-setup -fnoninteractive touch /var/lib/live/config/hotfixes } Hotfixes