1# $NetBSD: mkconf,v 1.1.1.1 1997/07/24 21:20:12 christos Exp $
| 1# $NetBSD: mkconf,v 1.1.1.1 1997/07/24 21:20:12 christos Exp $
|
2# $FreeBSD: head/usr.sbin/amd/include/newvers.sh 118437 2003-08-04 15:57:01Z ache $
| 2# $FreeBSD: head/usr.sbin/amd/include/newvers.sh 118449 2003-08-04 21:31:53Z ache $
|
3# mkconf 4# Generate local configuration parameters for amd 5# 6 7if [ -e $1 ]; then
| 3# mkconf 4# Generate local configuration parameters for amd 5# 6 7if [ -e $1 ]; then
|
8 eval `LANG=C egrep '^[A-Z]+=' $1 | grep -v COPYRIGHT` 9 OS=`echo ${TYPE} | LANG=C tr 'A-Z' 'a-z'`
| 8 eval `LC_ALL=C egrep '^[A-Z]+=' $1 | grep -v COPYRIGHT` 9 OS=`echo ${TYPE} | LC_ALL=C tr 'A-Z' 'a-z'`
|
10 echo '/* Define name and version of host machine (eg. solaris2.5.1) */' 11 echo "#define HOST_OS \"${OS}${REVISION}\"" 12 echo '/* Define only name of host machine OS (eg. solaris2) */' 13 echo "#define HOST_OS_NAME \"${OS}${REVISION}\"" \ 14 | sed -e 's/\.[-._0-9]*//' 15 echo '/* Define only version of host machine (eg. 2.5.1) */' 16 echo "#define HOST_OS_VERSION \"${REVISION}\"" 17else 18cat << __NO_newvers_sh 19 20/* Define name and version of host machine (eg. solaris2.5.1) */
| 10 echo '/* Define name and version of host machine (eg. solaris2.5.1) */' 11 echo "#define HOST_OS \"${OS}${REVISION}\"" 12 echo '/* Define only name of host machine OS (eg. solaris2) */' 13 echo "#define HOST_OS_NAME \"${OS}${REVISION}\"" \ 14 | sed -e 's/\.[-._0-9]*//' 15 echo '/* Define only version of host machine (eg. 2.5.1) */' 16 echo "#define HOST_OS_VERSION \"${REVISION}\"" 17else 18cat << __NO_newvers_sh 19 20/* Define name and version of host machine (eg. solaris2.5.1) */
|
21#define HOST_OS "`uname -s | LANG=C tr 'A-Z' 'a-z'``uname -r`"
| 21#define HOST_OS "`uname -s | LC_ALL=C tr 'A-Z' 'a-z'``uname -r`"
|
22 23/* Define only name of host machine OS (eg. solaris2) */
| 22 23/* Define only name of host machine OS (eg. solaris2) */
|
24#define HOST_OS_NAME "`uname -s | LANG=C tr 'A-Z' 'a-z'``uname -r | sed -e 's/\..*$//'`"
| 24#define HOST_OS_NAME "`uname -s | LC_ALL=C tr 'A-Z' 'a-z'``uname -r | sed -e 's/\..*$//'`"
|
25 26/* Define only version of host machine (eg. 2.5.1) */ 27#define HOST_OS_VERSION "`uname -r | sed -e 's/[-([:alpha:]].*//'`" 28 29__NO_newvers_sh 30fi 31 32cat << __EOF 33 34/* Define name of host */ 35#define HOST_NAME "`hostname`" 36 37/* Define user name */ 38#define USER_NAME "`whoami`" 39 40/* Define configuration date */ 41#define CONFIG_DATE "`date`" 42 43__EOF
| 25 26/* Define only version of host machine (eg. 2.5.1) */ 27#define HOST_OS_VERSION "`uname -r | sed -e 's/[-([:alpha:]].*//'`" 28 29__NO_newvers_sh 30fi 31 32cat << __EOF 33 34/* Define name of host */ 35#define HOST_NAME "`hostname`" 36 37/* Define user name */ 38#define USER_NAME "`whoami`" 39 40/* Define configuration date */ 41#define CONFIG_DATE "`date`" 42 43__EOF
|