turns printfs back on
[freebsd-src/fkvm-freebsd.git] / contrib / sendmail / cf / sh / makeinfo.sh
blobe7b0cd101fcedc6578ebf7a536b308ed0bba4bd4
1 #!/bin/sh
3 # Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
4 # All rights reserved.
5 # Copyright (c) 1983 Eric P. Allman. All rights reserved.
6 # Copyright (c) 1988, 1993
7 # The Regents of the University of California. All rights reserved.
9 # By using this file, you agree to the terms and conditions set
10 # forth in the LICENSE file which can be found at the top level of
11 # the sendmail distribution.
14 # $Id: makeinfo.sh,v 8.14 1999/02/07 07:26:25 gshapiro Exp $
16 # $FreeBSD$
19 usewhoami=0
20 usehostname=0
21 for p in `echo $PATH | sed 's/:/ /g'`
23 if [ "x$p" = "x" ]
24 then
25 p="."
27 if [ -f $p/whoami ]
28 then
29 usewhoami=1
30 if [ $usehostname -ne 0 ]
31 then
32 break;
35 if [ -f $p/hostname ]
36 then
37 usehostname=1
38 if [ $usewhoami -ne 0 ]
39 then
40 break;
43 done
44 if [ $usewhoami -ne 0 ]
45 then
46 user=`whoami`
47 else
48 user=$LOGNAME
51 if [ $usehostname -ne 0 ]
52 then
53 host=`hostname`
54 else
55 host=`uname -n`
57 echo '#####' built by $user@$host on `LC_ALL=C LC_TIME=C date`
58 echo '#####' in `pwd` | sed 's/\/tmp_mnt//'
59 echo '#####' using $1 as configuration include directory | sed 's/\/tmp_mnt//'
60 echo "define(\`__HOST__', $host)dnl"