#!/bin/sh # echo "#!/bin/sh" > customize.$$ echo "sed \\" > customize.$$ chmod +x customize.$$ ################################################################ # find a working perl: # for i in /usr/bin/perl /usr/local/bin/perl /usr/bin/perl5 /usr/local/bin/perl5 do if $i -e 'exit ($] < 5.000)' then echo $i works perl="$i" break fi done if [ -z "$perl" ] then echo could not find a working perl command, sorry. exit 1 fi echo " -e 's,@@@perl@@@,$perl,g' \\" >> customize.$$ ################################################################ # find a working df: # for i in /bin/df /usr/bin/df /usr/bin/bdf /usr/sbin/df /usr/local/bin/df do a=`$i | awk 'NR == 1 {print $2}'` if [ "$a" = "kbytes" -o "$a" = "1024-blocks" ] then echo $i works df="$i" break fi a=`$i -k | awk 'NR == 1 {print $2}'` if [ "$a" = "kbytes" -o "$a" = "1024-blocks" ] then echo $i -k works df="$i -k" break fi done if [ -z "$df" ] then echo could not find a working df command, sorry. exit 1 fi echo " -e 's,@@@df@@@,$df,g' \\" >> customize.$$ ################################################################ # find repquota: # We don't try to check whether the output is useful, # just check whether we can call it. You may need root # privileges for this to succeed. # for i in /usr/sbin/repquota do if $i -a then echo $i works repquota="$i" break fi done if [ -z "$repquota" ] then echo could not find a working repquota command, sorry. exit 1 fi echo " -e 's,@@@repquota@@@,$repquota,g' \\" >> customize.$$ ################################################################ # find sendmail: # We don't try to check whether the mail is actually delivered, # just if sendmail accepts mail for a local user. # This may not be a very useful test. # user=`whoami` for i in /usr/sbin/sendmail /usr/lib/sendmail do if $i -t -i <> customize.$$ ################################################################ # $Id: configure,v 1.4 2004-11-30 09:27:01 hjp Exp $ # find scp command # touch scp.test.$$ for i in /usr/bin/scp /usr/local/bin/scp do rm -f scp.test.$$.new if $i scp.test.$$ scp.test.$$.new then if [ -f scp.test.$$.new ] then echo $i works scp="$i" break fi fi done rm -f scp.test.$$ scp.test.$$.new if [ -z "$scp" ] then echo could not find a working find command, sorry. exit 1 fi echo " -e 's,@@@scp@@@,$scp,g' \\" >> customize.$$ # $Log: configure,v $ # Revision 1.4 2004-11-30 09:27:01 hjp # Add check for scp to configure. Added rules to makefile to automatically # rebuild configure. # ################################################################ # finish # Add trailing newline and rename temp file to final name # echo >> customize.$$ mv customize.$$ customize