$NetBSD: patch-aa,v 1.6 2000/08/14 11:26:46 itojun Exp $
--- INSTALL.sh.orig	Mon Aug 14 19:32:38 2000
+++ INSTALL.sh	Mon Aug 14 19:33:07 2000
@@ -6,39 +6,39 @@
 PATH=/bin:/usr/bin:/usr/sbin:/usr/etc:/sbin:/etc
 umask 022
 
-cat <<EOF
-
-Warning: this script replaces existing sendmail or Postfix programs.
-Make backups if you want to be able to recover.
-
-In addition to doing a fresh install, this script can change an
-existing installation from using a world-writable maildrop to a
-group-writable one. It cannot be used to change Postfix queue
-file/directory ownership.
-
-Before installing files, this script prompts you for some definitions.
-Most definitions will be remembered, so you have to specify them
-only once. All definitions have a reasonable default value.
-
-    install_root - prefix for installed file names (for package building)
-
-    tempdir - where to write scratch files
-
-    config_directory - directory with Postfix configuration files.
-    daemon_directory - directory with Postfix daemon programs.
-    command_directory - directory with Postfix administrative commands.
-    queue_directory - directory with Postfix queues.
-
-    sendmail_path - full pathname of the Postfix sendmail command.
-    newaliases_path - full pathname of the Postfix newaliases command.
-    mailq_path - full pathname of the Postfix mailq command.
-
-    mail_owner - owner of Postfix queue files.
-
-    setgid - groupname, e.g., postdrop (default: no). See INSTALL section 12.
-    manpages - "no" or path to man tree. Example: /usr/local/man.
-
-EOF
+#cat <<EOF
+#
+#Warning: this script replaces existing sendmail or Postfix programs.
+#Make backups if you want to be able to recover.
+#
+#In addition to doing a fresh install, this script can change an
+#existing installation from using a world-writable maildrop to a
+#group-writable one. It cannot be used to change Postfix queue
+#file/directory ownership.
+#
+#Before installing files, this script prompts you for some definitions.
+#Most definitions will be remembered, so you have to specify them
+#only once. All definitions have a reasonable default value.
+#
+#    install_root - prefix for installed file names (for package building)
+#
+#    tempdir - where to write scratch files
+#
+#    config_directory - directory with Postfix configuration files.
+#    daemon_directory - directory with Postfix daemon programs.
+#    command_directory - directory with Postfix administrative commands.
+#    queue_directory - directory with Postfix queues.
+#
+#    sendmail_path - full pathname of the Postfix sendmail command.
+#    newaliases_path - full pathname of the Postfix newaliases command.
+#    mailq_path - full pathname of the Postfix mailq command.
+#
+#    mail_owner - owner of Postfix queue files.
+#
+#    setgid - groupname, e.g., postdrop (default: no). See INSTALL section 12.
+#    manpages - "no" or path to man tree. Example: /usr/local/man.
+#
+#EOF
 
 # By now, shells must have functions. Ultrix users must use sh5 or lose.
 # The following shell functions replace files/symlinks while minimizing
@@ -104,34 +104,31 @@
 
 install_root=/
 tempdir=`pwd`
-config_directory=/etc/postfix
-daemon_directory=/usr/libexec/postfix
-command_directory=/usr/sbin
+config_directory=__PREFIX/share/postfix
+daemon_directory=__PREFIX/libexec/postfix
+command_directory=__PREFIX/sbin
 queue_directory=/var/spool/postfix
-if [ -f /usr/lib/sendmail ]
-    then sendmail_path=/usr/lib/sendmail 
-    else sendmail_path=/usr/sbin/sendmail
-fi
-newaliases_path=/usr/bin/newaliases
-mailq_path=/usr/bin/mailq
+sendmail_path=__PREFIX/libexec/postfix/sendmail
+#newaliases_path=/usr/bin/newaliases
+#mailq_path=/usr/bin/mailq
 mail_owner=postfix
 setgid=no
-manpages=/usr/local/man
+manpages=__PREFIX/man
 
 # Find out the location of configuration files.
 
-for name in install_root tempdir config_directory
-do
-    while :
-    do
-	eval echo \$n "$name: [\$$name]\  \$c"
-	read ans
-	case $ans in
-	"") break;;
-	 *) eval $name=\$ans; break;;
-	esac
-    done
-done
+#for name in install_root tempdir config_directory
+#do
+#    while :
+#    do
+#	eval echo \$n "$name: [\$$name]\  \$c"
+#	read ans
+#	case $ans in
+#	"") break;;
+#	 *) eval $name=\$ans; break;;
+#	esac
+#    done
+#done
 
 # Sanity checks
 
@@ -153,31 +150,31 @@
 
 CONFIG_DIRECTORY=$install_root$config_directory
 
-test -f $CONFIG_DIRECTORY/main.cf && {
-    for name in daemon_directory command_directory queue_directory mail_owner 
-    do
-	eval $name='"`bin/postconf -c $CONFIG_DIRECTORY -h $name`"' || kill $$
-    done
-}
+#test -f $CONFIG_DIRECTORY/main.cf && {
+#    for name in daemon_directory command_directory queue_directory mail_owner 
+#    do
+#	eval $name='"`bin/postconf -c $CONFIG_DIRECTORY -h $name`"' || kill $$
+#    done
+#}
 
-test -f $CONFIG_DIRECTORY/install.cf && . $CONFIG_DIRECTORY/install.cf
+#test -f $CONFIG_DIRECTORY/install.cf && . $CONFIG_DIRECTORY/install.cf
 
 # Override default settings.
 
-for name in daemon_directory command_directory \
-    queue_directory sendmail_path newaliases_path mailq_path mail_owner\
-    setgid manpages
-do
-    while :
-    do
-	eval echo \$n "$name: [\$$name]\  \$c"
-	read ans
-	case $ans in
-	"") break;;
-	 *) eval $name=\$ans; break;;
-	esac
-    done
-done
+#for name in daemon_directory command_directory \
+#    queue_directory sendmail_path newaliases_path mailq_path mail_owner\
+#    setgid manpages
+#do
+#    while :
+#    do
+#	eval echo \$n "$name: [\$$name]\  \$c"
+#	read ans
+#	case $ans in
+#	"") break;;
+#	 *) eval $name=\$ans; break;;
+#	esac
+#    done
+#done
 
 # Sanity checks
 
@@ -225,10 +222,10 @@
 
 DAEMON_DIRECTORY=$install_root$daemon_directory
 COMMAND_DIRECTORY=$install_root$command_directory
-QUEUE_DIRECTORY=$install_root$queue_directory
+QUEUE_DIRECTORY=$queue_directory
 SENDMAIL_PATH=$install_root$sendmail_path
-NEWALIASES_PATH=$install_root$newaliases_path
-MAILQ_PATH=$install_root$mailq_path
+#NEWALIASES_PATH=$install_root$newaliases_path
+#MAILQ_PATH=$install_root$mailq_path
 MANPAGES=$install_root$manpages
 
 # Create any missing directories.
@@ -237,7 +234,7 @@
 test -d $DAEMON_DIRECTORY || mkdir -p $DAEMON_DIRECTORY || exit 1
 test -d $COMMAND_DIRECTORY || mkdir -p $COMMAND_DIRECTORY || exit 1
 test -d $QUEUE_DIRECTORY || mkdir -p $QUEUE_DIRECTORY || exit 1
-for path in $SENDMAIL_PATH $NEWALIASES_PATH $MAILQ_PATH
+for path in $SENDMAIL_PATH
 do
     dir=`echo $path|sed -e 's/[/][/]*[^/]*$//' -e 's/^$/\//'`
     test -d $dir || mkdir -p $dir || exit 1
@@ -257,8 +254,8 @@
 
 test -f bin/sendmail && {
     compare_or_replace a+x,go-w bin/sendmail $SENDMAIL_PATH || exit 1
-    compare_or_symlink $SENDMAIL_PATH $NEWALIASES_PATH
-    compare_or_symlink $SENDMAIL_PATH $MAILQ_PATH
+#    compare_or_symlink $SENDMAIL_PATH $NEWALIASES_PATH
+#    compare_or_symlink $SENDMAIL_PATH $MAILQ_PATH
 }
 
 if [ -f $CONFIG_DIRECTORY/main.cf ]
@@ -290,13 +287,13 @@
     "mail_owner = $mail_owner" \
 || exit 1
 
-(echo "# This file was generated by $0"
-for name in sendmail_path newaliases_path mailq_path setgid manpages
-do
-    eval echo $name=\$$name
-done) >$tempdir/junk || exit 1
-compare_or_move a+x,go-w $tempdir/junk $CONFIG_DIRECTORY/install.cf || exit 1
-rm -f $tempdir/junk
+#(echo "# This file was generated by $0"
+#for name in sendmail_path newaliases_path mailq_path setgid manpages
+#do
+#    eval echo $name=\$$name
+#done) >$tempdir/junk || exit 1
+#compare_or_move a+x,go-w $tempdir/junk $CONFIG_DIRECTORY/install.cf || exit 1
+#rm -f $tempdir/junk
 
 # Use set-gid privileges instead of writable maildrop (optional).