--- develop/install.orig 1999-12-07 09:40:11.000000000 +0000 +++ develop/install 2008-02-07 11:02:26.000000000 +0000 @@ -82,7 +82,6 @@ make_man fetchfile 7 $manmisc make_man sendfiled 8 $manadmin cp doc/wlock.1 doc/utf7encode.1 $MANDIR/man1 - (cd $MANDIR/man1; ln -s utf7encode.1 utf7decode.1 2>/dev/null) } SYSTEM=$1 @@ -165,14 +164,6 @@ To deinstall the sendfile-daemon, simply type: rm -f $SERVERDIR/sendfiled EOD -echo 'If you are satisfied with these defaults, then type "ok" now:' -read answer -if [ "$answer" != ok ]; then - echo - echo "You can install sendfile manually, too. Please type: more doc/README" - echo - exit -fi umask 022 @@ -233,16 +224,16 @@ mv $NOSENDFILE $DENY fi fi -if [ ! -f $DENY -a ! -f $ALLOW ]; then +if [ ! -f ${DENY}.sample -a ! -f $ALLOW ]; then echo "installing the sendfile deny file as $DENY" - cp etc/sendfile.deny $DENY - chmod 644 $DENY + cp etc/sendfile.deny ${DENY}.sample + chmod 644 ${DENY}.sample fi -if [ ! -f $CONFIG ]; then +if [ ! -f ${CONFIG}.sample ]; then echo "installing the global sendfile config file as $CONFIG" - cp etc/sendfile.cf $CONFIG - chmod 644 $CONFIG + cp etc/sendfile.cf ${CONFIG}.sample + chmod 644 ${CONFIG}.sample else if [ "`diff etc/sendfile.cf $CONFIG`" ]; then echo "Warning: `pwd`/etc/sendfile.cf differs from $CONFIG !" @@ -250,6 +241,23 @@ fi fi +if [ -z "$BATCH" ] ; then +echo '' +echo 'I would now configure and start your sendfiled.' +echo 'If you do not like this, enter "no" here' +read answer +fi +if [ "$answer" = no ]; then + echo + echo "Things left to do if you want to start sendfiled:" + echo + echo " - Maybe add 'saft 487/tcp' to /etc/services (prior to FreeBSD-4)" + echo " - Add sendfiled to /etc/inetd.conf and killall -HUP inetd" + echo " - Add 'test -x $BINDIR/check_sendfile && $BINDIR/check_sendfile'" + echo " to /etc/profile and /etc/csh.login" + echo +else + if [ "$SYSTEM" = NEXT ]; then SERVICE="`nidump services . | awk '/[ \t]487\/tcp/'`" else @@ -266,7 +274,6 @@ echo "saft 487/tcp # simple asynchronous file transfer" | niload services . else echo "configuring $SERVICES" - echo "#" >>$SERVICES echo "saft 487/tcp # simple asynchronous file transfer" >>$SERVICES fi fi @@ -279,8 +286,6 @@ fi RESTART=true echo "configuring $INETDCONF" - echo "#" >>$INETDCONF - echo "# simple asynchronous file transfer" >>$INETDCONF echo "saft stream tcp nowait root $SFD" >>$INETDCONF fi @@ -308,6 +313,8 @@ fi fi +fi + if [ ! -d "$SPOOL/OUTGOING" ]; then echo "creating $SPOOL" mkdir_recursive $SPOOL/OUTGOING @@ -334,7 +341,7 @@ fi free=`$SERVERDIR/sendfiled -f` -minfree=`awk '/minfree =/{print $3}' $CONFIG` +minfree=`awk '/minfree =/{print $3}' ${CONFIG}.sample` if [ "$free" -le "$minfree" ]; then cat <