1#!/bin/sh 2# 3# Copyright (c) 1998 Sendmail, Inc. All rights reserved. 4# Copyright (c) 1983 Eric P. Allman. All rights reserved. 5# Copyright (c) 1988, 1993 6# The Regents of the University of California. All rights reserved. 7# 8# By using this file, you agree to the terms and conditions set 9# forth in the LICENSE file which can be found at the top level of 10# the sendmail distribution. 11# 12# 13# @(#)makeinfo.sh 8.11 (Berkeley) 5/19/1998 14# 15 16usewhoami=0 17usehostname=0 18for p in `echo $PATH | sed 's/:/ /g'` 19do 20 if [ "x$p" = "x" ] 21 then 22 p="." 23 fi 24 if [ -f $p/whoami ] 25 then 26 usewhoami=1 27 if [ $usehostname -ne 0 ] 28 then 29 break; 30 fi 31 fi 32 if [ -f $p/hostname ] 33 then 34 usehostname=1 35 if [ $usewhoami -ne 0 ] 36 then 37 break; 38 fi 39 fi 40done 41if [ $usewhoami -ne 0 ] 42then 43 user=`whoami` 44else 45 user=$LOGNAME 46fi 47 48if [ $usehostname -ne 0 ] 49then 50 host=`hostname` 51else 52 host=`uname -n` 53fi 54echo '#####' built by $user@$host on `LC_TIME=C date` 55echo '#####' in `pwd` | sed 's/\/tmp_mnt//' 56echo '#####' using $1 as configuration include directory | sed 's/\/tmp_mnt//' 57echo "define(\`__HOST__', $host)dnl" 58