$NetBSD: patch-ae,v 1.5 2010/06/27 19:16:03 joerg Exp $

--- Count-install.orig	1999-05-17 01:01:50.000000000 +0000
+++ Count-install
@@ -13,7 +13,6 @@
 # Nov 24, 1995
 ##
 ver=`cat ./VERSION`
-Basedir="wwwcount$ver"
 INSTALL_PROG="./install-sh"
 Tmpl="./Config.tmpl"
 Binary="./bin/Count.cgi"
@@ -28,8 +27,6 @@ Digit_cdd="./data/digits/cdd"
 Digit_bang="./data/digits/bang"
 Rgbfile="./data/rgb.txt"
 SAMPLE_DAT="./data/data/sample.dat"
-mirror_file="mirror_count.sh"
-mirror_script="./utils/mirror/$mirror_file"
 
 UserId="nobody"
 userid_flag=0
@@ -115,20 +112,6 @@ fi
 
 . $Tmpl
 
-if [ ! -f ./$CONFIG_FILE ]
-then
-
-cat <<EOC
-
-    The configuration file $CONFIG_FILR is not created!
-    please create it first by running the script ./Gen-conf
-
-    Aborting installation!
-EOC
-
-    exit 1
-fi
-
 tdir="./tmp"
 
 if [ ! -d $tdir ]; then
@@ -197,7 +180,6 @@ anything else.
 
 cgi-bin directory   = $CGIBIN_DIR
 conf directory      = $CONFIG_DIR
-conf file to install= $CONFIG_FILE
 digit directory     = $DIGIT_DIR
 data directory      = $DATA_DIR
 log directory       = $LOG_DIR
@@ -212,7 +194,7 @@ read answer
 
 if [ .$answer = . ]
 then
-    answer=x
+    answer=y
 fi
     until [ $answer = "y" -o $answer = "Y" -o $answer = "n" -o $answer = "N" ]
     do
@@ -253,7 +235,7 @@ echo $n "*Do you know the user and group
    read answer
    if [ .$answer = . ]
    then
-        answer=x
+	answer=y
    fi   
    until [ $answer = "y" -o $answer = "Y" -o $answer = "n" -o $answer = "N" ]
    do
@@ -272,11 +254,11 @@ echo $n "*Do you know the user and group
 ###
 # enter user id -starts
 ###
-   echo $n "*Enter user id of httpd's child process [no default]:$c? "
+   echo $n "*Enter user id of httpd's child process [nobody]:$c? "
    read answer
    if [ .$answer = . ]
    then 
-        answer=x
+	answer=nobody
    fi
    until [ $answer != "x" ]
    do
@@ -296,11 +278,11 @@ echo $n "*Do you know the user and group
 ##
 # enter groud id -starts
 ##
-   echo $n "*Enter group id of httpd's child process [no default]:$c? "
+   echo $n "*Enter group id of httpd's child process [nogroup]:$c? "
    read answer
    if [ .$answer = . ]
    then 
-        answer=x
+	answer=nogroup
    fi
    until [ $answer != "x" ]
    do
@@ -318,47 +300,18 @@ echo $n "*Do you know the user and group
 # enter groud id -ends
 ##
 echo "installing Count.cgi->$CGIBIN_DIR"
-$INSTALL_PROG -c -o $UserId -g $GroupId -m 700 $Binary $CGIBIN_DIR/Count.cgi
-echo "installing $CONFIG_FILE->$CONFIG_DIR"
+$INSTALL_PROG -c $Binary $CGIBIN_DIR/Count.cgi
 
-#
-# check if the file exist or not
-#
+#echo "installing sample datafile $SAMPLE_DAT->$RGB_DIR"
+#$INSTALL_PROG -c -o $UserId -g $GroupId -m 664 $SAMPLE_DAT $RGB_DIR/sample.dat
 
-if [ ! -f $CONFIG_DIR/$CONFIG_FILE ]; then
+echo "installing rgb.txt->$RGB_DIR"
+$INSTALL_PROG -c -m 644 $Rgbfile $RGB_DIR/rgb.txt
 
-    $INSTALL_PROG -c -m 664 $CONFIG_FILE $CONFIG_DIR/$CONFIG_FILE
-else
-    echo "  ===> ****** File exists!"
-    echo "  ===> skipping... Will not overwrite $CONFIG_DIR/$CONFIG_FILE"
-    echo "  ===> install it manually if you want to overwrite"
-	echo "  ===> To install manually, at the shell prompt type: "
-    echo " $INSTALL_PROG -c -m 664 $CONFIG_FILE $CONFIG_DIR/$CONFIG_FILE"
-	echo ""
-fi
-
-echo "installing sample datafile $SAMPLE_DAT->$DATA_DIR"
-
-if [ ! -f $DATA_DIR/sample.dat ]; then
-    $INSTALL_PROG -c -o $UserId -g $GroupId -m 664 $SAMPLE_DAT $DATA_DIR/sample.dat
-chmod 775 $DATA_DIR
-else
-    echo "  ===> File exists!"
-    echo "  ===> skipping... Will not overwrite $DATA_DIR/sample.dat"
-    echo "  ===> copy it manually if you want to overwrite"
-    echo "  ===>  To install manually, at the shell prompt type: "
-	echo " $INSTALL_PROG -c -o $UserId -g $GroupId -m 664 $SAMPLE_DAT $DATA_DIR/sample.dat"
-	echo ""
-fi
-
-echo "installing rgb.txt->$BASE_DIR"
-$INSTALL_PROG -c -m 644 $Rgbfile $BASE_DIR/rgb.txt
-
-echo "creating Log directory $LOG_DIR"
-./mkdirhier $LOG_DIR
-chown $UserId $LOG_DIR
-chgrp $GroupId $LOG_DIR
-chmod 775 $LOG_DIR
+echo "installing $LOG_FILE->$LOG_DIR"
+#touch $LOG_DIR/$LOG_FILE
+#chmod 644 $LOG_DIR/$LOG_FILE
+#chown $UserId.$GroupId $LOG_DIR/$LOG_FILE
 
 echo "installing image strip for digit style A->$DIGIT_DIR/A"
 $INSTALL_PROG -c -m 644 $DigitA/strip.gif $DIGIT_DIR/A/strip.gif
@@ -400,18 +353,6 @@ $INSTALL_PROG -c -m 644 $Digit_cdd/strip
 echo "installing strip image for digit style bang->$DIGIT_DIR/bang"
 $INSTALL_PROG -c -m 644 $Digit_bang/strip.gif $DIGIT_DIR/bang/strip.gif
 
-echo "installing the mirroring script"
-$INSTALL_PROG -c $mirror_script -m 755 $BASE_DIR/$mirror_file
-
-##
-# change ownership
-# -R is not portable, reported by Geoff Scully <gws@dis.on.ca> and suggested
-# the alternative (01/15/96)
-#chown -R $UserId.$GroupId $BASE_DIR
-#find $BASE_DIR -exec chown $UserId {} \;
-#find $BASE_DIR -exec chgrp $GroupId {} \;
-#            echo "UserId=$UserId"
-#            echo "GroupId=$GroupId"
         ;;
         n|N)
 cat <<EOM
@@ -424,17 +365,16 @@ cat <<EOM
 
 EOM
 echo "installing Count.cgi->$CGIBIN_DIR"
-$INSTALL_PROG -c -m 755 $Binary $CGIBIN_DIR/Count.cgi
-echo "installing $CONFIG_FILE->$CONFIG_DIR"
-$INSTALL_PROG -c $CONFIG_FILE $CONFIG_DIR/$CONFIG_FILE
+$INSTALL_PROG -s -c -m 755 $Binary $CGIBIN_DIR/Count.cgi
 echo "installing sample datafile $SAMPLE_DAT->$DATA_DIR"
 $INSTALL_PROG -c $SAMPLE_DAT $DATA_DIR/sample.dat
 
-echo "installing rgb.txt->$BASE_DIR"
-$INSTALL_PROG -c $Rgbfile $BASE_DIR/rgb.txt
+echo "installing rgb.txt->$RGB_DIR"
+$INSTALL_PROG -c $Rgbfile $RGB_DIR/rgb.txt
 
-echo "creating Log directory $LOG_DIR"
-./mkdirhier $LOG_DIR
+echo "installing $LOG_FILE->$LOG_DIR"
+touch $LOG_DIR/$LOG_FILE
+chmod 644 $LOG_DIR/$LOG_FILE
 
 echo "installing image strip for digit style A->$DIGIT_DIR/A"
 $INSTALL_PROG -c $DigitA/strip.gif $DIGIT_DIR/A/strip.gif
@@ -475,9 +415,6 @@ $INSTALL_PROG -c $Digit_cdd/strip.gif $D
 echo "installing strip image for digit style bang->$DIGIT_DIR/bang"
 $INSTALL_PROG -c $Digit_bang/strip.gif $DIGIT_DIR/bang/strip.gif
 
-echo "installing the mirroring script"
-$INSTALL_PROG -c $mirror_script $BASE_DIR/$mirror_file
-
     ;;
         *)
    esac
