Add changes for firefox pointing to test day page. Fixes bug 967558

This commit is contained in:
Kevin Fenzi 2013-05-28 07:49:21 -06:00
parent 3f5cc8a236
commit ee0c9038eb

View File

@ -110,7 +110,9 @@ firefox
# the installed system. This image is not intended for installation, but you # the installed system. This image is not intended for installation, but you
# never know what your users might do. # never know what your users might do.
cat >> /etc/rc.d/init.d/livesys << EOF # "EOF" is quoted so that variables are not expanded. Search for "here-document"
# in man bash.
cat >> /etc/rc.d/init.d/livesys << "EOF"
# Create Test Day welcome screen # Create Test Day welcome screen
# Note that shebang must be written this way, else it is considered as comment # Note that shebang must be written this way, else it is considered as comment
@ -135,22 +137,27 @@ ln -s /usr/share/applications/test-day-welcome.desktop /etc/xdg/autostart/
rm -f /home/liveuser/.config/autostart/fedora-welcome.desktop rm -f /home/liveuser/.config/autostart/fedora-welcome.desktop
# Change Firefox start page to open Test Day wiki and IRC chat # Change Firefox start page to open Test Day wiki and IRC chat
mkdir -p /tmp/chrome/en-US/locale/branding # (and a few more properties)
cat << FOE > /tmp/chrome/en-US/locale/branding/browserconfig.properties mkdir /tmp/firefox
unzip /usr/lib*/firefox/browser/omni.ja -d /tmp/firefox
cat << FOE > /tmp/firefox/chrome/en-US/locale/branding/browserconfig.properties
browser.startup.homepage=https://fedoraproject.org/wiki/Test_Day:Current | http://webchat.freenode.net/?channels=fedora-test-day browser.startup.homepage=https://fedoraproject.org/wiki/Test_Day:Current | http://webchat.freenode.net/?channels=fedora-test-day
FOE FOE
# Set up a few more properties cat << FOE >> /tmp/firefox/defaults/preferences/firefox-branding.js
unzip /usr/lib*/firefox/omni.ja defaults/preferences/firefox-branding.js -d /tmp
cat << FOE >> /tmp/defaults/preferences/firefox-branding.js
pref("startup.homepage_welcome_url",""); pref("startup.homepage_welcome_url","");
pref("startup.homepage_override_url",""); pref("startup.homepage_override_url","");
pref("browser.rights.3.shown", true); pref("browser.rights.3.shown", true);
FOE FOE
(cd /tmp; zip /usr/lib*/firefox/omni.ja chrome/en-US/locale/branding/browserconfig.properties \ # We need to re-zip the whole archive (instead of just updating files), because
defaults/preferences/firefox-branding.js) # the original archive is "Firefox optimized" and updating doesn't work
rm -rf /tmp/chrome /tmp/defaults # https://bugzilla.mozilla.org/show_bug.cgi?id=605524
OMNIJA=`ls /usr/lib*/firefox/browser/omni.ja`
rm -f $OMNIJA
(cd /tmp/firefox; zip -r -0 $OMNIJA *)
rm -rf /tmp/firefox
# Adjust launchers in dash using a vendor override. (Adding a profile would # Adjust launchers in dash using a vendor override. (Adding a profile would
# be another way to do this.) # be another way to do this.)