diff options
Diffstat (limited to 'arch/powerpc/boot/install.sh')
| -rwxr-xr-x[-rw-r--r--] | arch/powerpc/boot/install.sh | 39 |
1 files changed, 10 insertions, 29 deletions
diff --git a/arch/powerpc/boot/install.sh b/arch/powerpc/boot/install.sh index 14473150ddb4..c3df6c27ce75 100644..100755 --- a/arch/powerpc/boot/install.sh +++ b/arch/powerpc/boot/install.sh @@ -15,42 +15,23 @@ # $2 - kernel image file # $3 - kernel map file # $4 - default install path (blank if root directory) -# -# Bail with error code if anything goes wrong set -e -verify () { - if [ ! -f "$1" ]; then - echo "" 1>&2 - echo " *** Missing file: $1" 1>&2 - echo ' *** You need to run "make" before "make install".' 1>&2 - echo "" 1>&2 - exit 1 - fi -} - -# Make sure the files actually exist -verify "$2" -verify "$3" - -# User may have a custom install script - -if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi -if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi +# this should work for both the pSeries zImage and the iSeries vmlinux.sm +image_name=$(basename "$2") -# Default install -# this should work for both the pSeries zImage and the iSeries vmlinux.sm -image_name=`basename $2` +echo "Warning: '${INSTALLKERNEL}' command not available... Copying" \ + "directly to $4/$image_name-$1" >&2 -if [ -f $4/$image_name ]; then - mv $4/$image_name $4/$image_name.old +if [ -f "$4"/"$image_name"-"$1" ]; then + mv "$4"/"$image_name"-"$1" "$4"/"$image_name"-"$1".old fi -if [ -f $4/System.map ]; then - mv $4/System.map $4/System.old +if [ -f "$4"/System.map-"$1" ]; then + mv "$4"/System.map-"$1" "$4"/System-"$1".old fi -cat $2 > $4/$image_name -cp $3 $4/System.map +cat "$2" > "$4"/"$image_name"-"$1" +cp "$3" "$4"/System.map-"$1" |
