#!/bin/sh # # install - installation script for the Z505HE/HS Red Hat 6.2 fixup kit. # See http://www.foogod.com/z505h-linux for details. # # Version 1.3 written by Alex Stewart , Oct 30, 2000 if ! rpm -q pciutils >/dev/null; then echo "" >&2 echo "You do not have the pciutils RPM installed. You must install this package" >&2 echo "before you can install the fixup kit." >&2 exit 1 fi if ! rpm -q patch >/dev/null; then echo "" >&2 echo "Several of the fixups in this kit require the use of the 'patch' utility," >&2 echo "which you do not appear to have installed. Please locate the 'patch' RPM" >&2 echo "on your Red Hat install CD or elsewhere and install it before proceeding" >&2 echo "with this fixup kit installation." >&2 exit 2 fi echo "Installing packages..." # (never upgrade (-U) a kernel, always install (-i)) rpm -ivh kernel-2.4.0-test5.i686.rpm if rpm -U --test kernel-headers-2.4.0-test5.i386.rpm >/dev/null 2>&1; then rpm -Uvh kernel-headers-2.4.0-test5.i386.rpm else # If they have the 2.2 kernel-source package installed, it won't be able to # remove the old kernel-headers package. In this case, just install the new # one as well. rpm -ivh kernel-headers-2.4.0-test5.i386.rpm fi rpm -Uvh kernel-pcmcia-cs-2.4.0-test5.i386.rpm rpm -Uvh modutils-2.3.14-1as.i386.rpm rpm -Uvh util-linux-2.10m-1.i386.rpm # PPP may or may not be installed. Only upgrade it if it's installed (-F). rpm -Fvh ppp-2.4.0b4-1.i386.rpm # (the version number on this RPM changes frequently enough that we'll do it # this way so we don't have to worry about this file getting out of sync every # time it changes. Install the latest z505 RPM we can find in this directory.) z505rpm=`ls z505-*.noarch.rpm | tail -n 1` rpm -Uvh $z505rpm if [ -x /usr/sbin/kudzu ]; then if /sbin/lspci -n | grep -q '10c8:0016'; then # Found a NM256XL+ chipset (Z505JS laptop). The display will # probably require configuration now that we've applied the kudzu patch # contained in the z505 RPM, so run kudzu to take care of it. /usr/sbin/kudzu # If they configured X, we will need to re-apply the usbmouse patch. if [ -e /etc/X11/XF86Config ]; then cd / patch -p0 < /usr/share/z505_update/XF86Config-usbmouse.patch > /dev/null fi fi fi if fdisk -l /dev/hda | grep -q FAT16; then done=0; while [ $done = 0 ]; do echo -n "Do you want to set up suspend-to-disk? [Y/N] "; read yn case $yn in y*|Y*) yn=y; done=1;; n*|N*) yn=n; done=1;; esac done fi if [ $yn = y ]; then /usr/sbin/z505-phdinst fi echo "" echo "Don't forget to disable \"Plug'n'Play OS\" in the BIOS configuration (press F2" echo "during boot to enter BIOS setup)" echo "(note, however, that Windows may not like this)"