desktop: prevent unintended failures in the livesys initscript

Some of the tweaks we do there may fail if the packages containing
the touched files are not present. Better be careful.
This commit is contained in:
Matthias Clasen 2011-03-23 11:58:48 -04:00
parent 47eaac1dc1
commit 8141a790b5
1 changed files with 19 additions and 11 deletions

View File

@ -27,8 +27,10 @@ cat >> /usr/share/glib-2.0/schemas/org.gnome.desktop.screensaver.gschema.overrid
lock-enabled=false lock-enabled=false
FOE FOE
# make the installer show up
if [ -f /usr/share/applications/liveinst.desktop ]; then
# Show harddisk install in shell dash # Show harddisk install in shell dash
sed -i -e 's/NoDisplay=true/NoDisplay=false/' /usr/share/applications/liveinst.desktop sed -i -e 's/NoDisplay=true/NoDisplay=false/' /usr/share/applications/liveinst.desktop ""
# need to move it to anaconda.desktop to make shell happy # need to move it to anaconda.desktop to make shell happy
mv /usr/share/applications/liveinst.desktop /usr/share/applications/anaconda.desktop mv /usr/share/applications/liveinst.desktop /usr/share/applications/anaconda.desktop
@ -36,7 +38,6 @@ cat >> /usr/share/glib-2.0/schemas/org.gnome.shell.gschema.override << FOE
[org.gnome.shell] [org.gnome.shell]
favorite-apps=['mozilla-firefox.desktop', 'evolution.desktop', 'empathy.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'openoffice.org-writer.desktop', 'nautilus.desktop', 'anaconda.desktop'] favorite-apps=['mozilla-firefox.desktop', 'evolution.desktop', 'empathy.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'openoffice.org-writer.desktop', 'nautilus.desktop', 'anaconda.desktop']
FOE FOE
glib-compile-schemas /usr/share/glib-2.0/schemas
# add installer to user menu # add installer to user menu
mkdir -p ~liveuser/.local/share/gnome-shell/extensions/Installer@shell-extensions.fedoraproject.org mkdir -p ~liveuser/.local/share/gnome-shell/extensions/Installer@shell-extensions.fedoraproject.org
@ -59,6 +60,11 @@ function main() {
} }
FOE FOE
fi
# rebuild schema cache with any overrides we installed
glib-compile-schemas /usr/share/glib-2.0/schemas
# set up timed auto-login for after 60 seconds # set up timed auto-login for after 60 seconds
cat >> /etc/gdm/custom.conf << FOE cat >> /etc/gdm/custom.conf << FOE
[daemon] [daemon]
@ -67,7 +73,9 @@ AutomaticLogin=liveuser
FOE FOE
# Turn off PackageKit-command-not-found while uninstalled # Turn off PackageKit-command-not-found while uninstalled
if [ -f /etc/PackageKit/CommandNotFound.conf ]; then
sed -i -e 's/^SoftwareSourceSearch=true/SoftwareSourceSearch=false/' /etc/PackageKit/CommandNotFound.conf sed -i -e 's/^SoftwareSourceSearch=true/SoftwareSourceSearch=false/' /etc/PackageKit/CommandNotFound.conf
fi
EOF EOF