[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#37616: libc6 preinstall script for sparc patch to fix

Fixed and tested a small patch to the preinstall script... fixes the
exit status 1 problem.

change lines:

cputype=`egrep '^type.*:.*sun4m' /proc/cpuinfo 2> /dev/null`
kernel_ver=`uname -r`

if [ "$cputype" != "" ]

to read:

cputype=`grep type /proc/cpuinfo | cut -d\: -f2 | cut -d\  -f2`
kernel_ver=`uname -r`

if [ "$cputype" == "sun4m" ]

This fixes the problem. The reason for the exit 1 was that both grep and
egrep fail with exit status 1 if their search string is not found. This
method fixes it since all sparc platforms must contain a type	: whatever 

If you have a more elegant way to do it go for it... but this is the
general gist of the deal...
Todd Freeman
CS Unix Support
CAST Online Editor
Web site: http://www.andrews.edu/~freeman/

Reply to: