diff options
Diffstat (limited to 'usr.sbin/amd/include/newvers.sh')
-rw-r--r-- | usr.sbin/amd/include/newvers.sh | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/usr.sbin/amd/include/newvers.sh b/usr.sbin/amd/include/newvers.sh index 09068b0..bc7c49b 100644 --- a/usr.sbin/amd/include/newvers.sh +++ b/usr.sbin/amd/include/newvers.sh @@ -3,14 +3,19 @@ # mkconf # Generate local configuration parameters for amd # -cat << __EOF - -/* Define name of host machine's cpu (eg. sparc) */ -/* #define HOST_CPU "`uname -p`" */ -#define HOST_CPU "`uname -m`" -/* Define name of host machine's architecture (eg. sun4) */ -#define HOST_ARCH "`uname -m`" +if [ -e ../../../sys/conf/newvers.sh ]; then + eval `egrep '^[A-Z]+=' ../../../sys/conf/newvers.sh | grep -v COPYRIGHT` + OS=`echo ${TYPE} | tr '[A-Z]' '[a-z]'` + echo '/* Define name and version of host machine (eg. solaris2.5.1) */' + echo "#define HOST_OS \"${OS}${REVISION}\"" + echo '/* Define only name of host machine OS (eg. solaris2) */' + echo "#define HOST_OS_NAME \"${OS}${REVISION}\"" \ + | sed -e 's/\.[-._0-9]*//' + echo '/* Define only version of host machine (eg. 2.5.1) */' + echo "#define HOST_OS_VERSION \"${REVISION}\"" +else +cat << __NO_newvers_sh /* Define name and version of host machine (eg. solaris2.5.1) */ #define HOST_OS "`uname -s | tr '[A-Z]' '[a-z]'``uname -r`" @@ -18,8 +23,10 @@ cat << __EOF /* Define only name of host machine OS (eg. solaris2) */ #define HOST_OS_NAME "`uname -s | tr '[A-Z]' '[a-z]'``uname -r | sed -e 's/\..*$//'`" -/* Define only version of host machine (eg. 2.5.1) */ -#define HOST_OS_VERSION "`uname -r`" +__NO_newvers_sh +fi + +cat << __EOF /* Define name of host */ #define HOST_NAME "`hostname`" |