3 # Copyright (c) 1999 by Sun Microsystems, Inc.
6 #pragma ident "%Z%%M% %I% %E% SMI"
8 UNAME_R
=`/usr/bin/uname -r`
10 OS_MAJOR
=`echo $UNAME_R | /usr/bin/sed -e 's/^\([^.]*\).*/\1/'`
11 OS_MINOR
=`echo $UNAME_R | /usr/bin/sed -e 's/^[^.]*\.\([^.]*\).*/\1/'`
12 OS_VERSION
=`echo $UNAME_R | tr '.' '_'`
14 cat <<EOF > new_os_version.h
18 #define SUNOS_$OS_VERSION
19 #define OS_MAJOR $OS_MAJOR
20 #define OS_MINOR $OS_MINOR
25 if [ -f os_version.h
]; then
26 if /usr
/bin
/cmp -s new_os_version.h os_version.h
; then
27 /usr
/bin
/rm -f new_os_version.h
29 /usr
/bin
/rm -f os_version.h
30 /usr
/bin
/mv new_os_version.h os_version.h
33 /usr
/bin
/mv new_os_version.h os_version.h