#!/usr/bin/sh # This script should be run in the same folder where the # install_flash_player_11_linux.i386.tar.gz file is at # on Ubuntu 10.04 to install the new flash player in such # a way that you can go back to the old one. You may need # to copy all of the image and other files manually but I # have found you only need to do it once for each major # version of Flash - so far. But you do have a way of # backing up to the previous version of flash if you have # problems. No warranty is made that it will work, # especially for other versions of Ubuntu, much less some # other distro. WHOAMI=`whoami` case ${WHOAMI} in root) ;; *) echo you must be root to run this script exit 1 ;; esac if [ ! -s install_flash_player_11_linux.i386.tar.gz ] then echo you need to have a install_flash_player_11_linux.i386.tar.gz echo exiting exit 1 fi rm -f InstallLog.txt echo >> InstallLog.txt echo >> InstallLog.txt chown 0:0 install_flash_player_11_linux.i386.tar.gz gzip -dc install_flash_player_11_linux.i386.tar.gz | tar -xvf - > foo ssort < foo >> InstallLog.txt rm -f foo echo >> InstallLog.txt if [ -d usr ] then find usr -type d -exec chmod 755 {} \; find usr -type d -exec chown root:root {} \; find usr -type f -exec chmod 644 {} \; find usr -type f -exec chown bin:bin {} \; find usr -type l -exec chown bin:bin {} \; find usr -type l -exec chmod 755 {} \; chmod 755 usr/bin/flash-player-properties else echo THERE IS NO usr FOLDER >> InstallLog.txt echo >> InstallLog.txt fi if [ ! -s libflashplayer.so ] then echo there is no libflashplayer.so >> InstallLog.txt echo >> InstallLog.txt else chown bin:bin libflashplayer.so chmod 644 libflashplayer.so if [ ! -d /usr/lib/libflashplayer ] then mkdir /usr/lib/libflashplayer fi rm -f /usr/lib/libflashplayer/libflashplayer.so cp -fp libflashplayer.so /usr/lib/libflashplayer/libflashplayer.so diff libflashplayer.so /usr/lib/libflashplayer/libflashplayer.so >> InstallLog.txt ls -l libflashplayer.so /usr/lib/libflashplayer/libflashplayer.so >> InstallLog.txt echo >> InstallLog.txt echo be sure to create symbolic links to the flash player >> InstallLog.txt echo /usr/lib/libflashplayer/libflashplayer.so in the >> InstallLog.txt echo /usr/lib/firefox-addons/plugins and >> InstallLog.txt echo /usr/lib/opera/plugins folders. eg - go to the folders and type >> InstallLog.txt echo ln -s /usr/lib/libflashplayer/libflashplayer.so libflashplayer.so >> InstallLog.txt echo >> InstallLog.txt fi # This is always changing so now the script does it automatically if [ -s usr/lib/kde4/kcm_adobe_flash_player.so ] && [ -s /usr/lib/kde4/kcm_adobe_flash_player.so ] then if ! diff usr/lib/kde4/kcm_adobe_flash_player.so /usr/lib/kde4/kcm_adobe_flash_player.so > /dev/null 2>&1 then echo replacing file kcm_adobe_flash_player.so >> InstallLog.txt cp -fp usr/lib/kde4/kcm_adobe_flash_player.so /usr/lib/kde4/kcm_adobe_flash_player.so fi diff usr/lib/kde4/kcm_adobe_flash_player.so /usr/lib/kde4/kcm_adobe_flash_player.so >> InstallLog.txt ls -l usr/lib/kde4/kcm_adobe_flash_player.so /usr/lib/kde4/kcm_adobe_flash_player.so >> InstallLog.txt else echo either usr/lib/kde4/kcm_adobe_flash_player.so or >> InstallLog.txt echo /usr/lib/kde4/kcm_adobe_flash_player.so does not exist >> InstallLog.txt fi echo >> InstallLog.txt # This never changes if [ -s usr/bin/flash-player-properties ] && [ -s /usr/bin/flash-player-properties ] then diff usr/bin/flash-player-properties /usr/bin/flash-player-properties >> InstallLog.txt ls -l usr/bin/flash-player-properties /usr/bin/flash-player-properties >> InstallLog.txt else echo either usr/bin/flash-player-properties or >> InstallLog.txt echo /usr/bin/flash-player-properties does not exist >> InstallLog.txt fi echo >> InstallLog.txt # Now make a hard link of the new libflashplayer.so # We may need to scramble back to the old version for graphics lib mismatches. CURDIR=`pwd` DATEDIR=`date -u +"%F"` cd /usr/lib/libflashplayer > /dev/null 2>&1 mkdir ${DATEDIR} if [ -s libflashplayer.so ] && [ -d ${DATEDIR} ] then cd ${DATEDIR} > /dev/null 2>&1 ln ../libflashplayer.so libflashplayer.so pwd >> ${CURDIR}/InstallLog.txt ls -il ../libflashplayer.so libflashplayer.so >> ${CURDIR}/InstallLog.txt fi cd ${CURDIR} > /dev/null 2>&1 unset DATEDIR CURDIR echo >> InstallLog.txt echo >> InstallLog.txt clear cat InstallLog.txt exit