#!/bin/sh # check for root privileges if [ "$UID" != "0" ]; then echo "You need root privileges to run this" exit 1 fi # Update all the shared library links: if [ -x /sbin/ldconfig ]; then /sbin/ldconfig & fi # mkfontdir and mkfontscale for fontdir in 100dpi 75dpi OTF Speedo TTF Type1 cyrillic ; do if [ -d usr/share/fonts/$fontdir ]; then mkfontscale /usr/share/fonts/$fontdir 1> /dev/null 2> /dev/null mkfontdir /usr/share/fonts/$fontdir 1> /dev/null 2> /dev/null fi done if [ -d usr/share/fonts/misc ]; then chroot . mkfontscale /usr/share/fonts/misc 1> /dev/null 2> /dev/null chroot . mkfontdir -e /usr/share/fonts/encodings -e /usr/share/fonts/encodings/large /usr/share/fonts/misc 1> /dev/null 2> /dev/null fi # Update the X font indexes: if [ -x /usr/bin/fc-cache ]; then /usr/bin/fc-cache -f & fi # Update any existing icon cache files: if find /usr/share/icons -maxdepth 2 2> /dev/null | grep -q icon-theme.cache ; then for theme_dir in /usr/share/icons/* ; do if [ -r ${theme_dir}/icon-theme.cache ]; then /usr/bin/gtk-update-icon-cache -t -f ${theme_dir} 1> /dev/null 2> /dev/null & fi done # This would be a large file and probably shouldn't be there. if [ -r /usr/share/icons/icon-theme.cache ]; then rm -f /usr/share/icons/icon-theme.cache fi fi /usr/sbin/cups-genppdupdate 1> /dev/null 2> /dev/null # Update desktop database: if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database /usr/share/applications 1> /dev/null 2> /dev/null fi # Update mime database: if [ -x /usr/bin/update-mime-database -a -d /usr/share/mime ]; then /usr/bin/update-mime-database /usr/share/mime 1> /dev/null 2> /dev/null & fi # These GTK+/pango files need to be kept up to date for # proper input method, pixbuf loaders, and font support. if [ -x /usr/bin/update-gtk-immodules ]; then /usr/bin/update-gtk-immodules fi if [ -x /usr/bin/update-gdk-pixbuf-loaders ]; then /usr/bin/update-gdk-pixbuf-loaders fi if [ -x /usr/bin/update-pango-querymodules ]; then /usr/bin/update-pango-querymodules fi # glib schemas if [ -x /usr/bin/glib-compile-schemas ]; then /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas > /dev/null 2>&1 fi # ca-certificates if [ -x /usr/sbin/update-ca-certificates ]; then /usr/sbin/update-ca-certificates --fresh 1> /dev/null 2> /dev/null fi