1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-14 23:46:10 +00:00
freebsd-ports/net/sendfile/files/patch-ab
Steve Price a7e7418d16 Update to use sendfile-19980228
PR:		5887
Submitted by:	Stefan 'Sec' Zehl <sec@42.org>
1998-03-01 21:51:04 +00:00

74 lines
2.2 KiB
Plaintext

--- develop/install.orig Fri Feb 27 08:29:16 1998
+++ develop/install Sun Mar 1 15:34:53 1998
@@ -133,14 +133,6 @@
To deinstall the sendfile-daemon, simply type: rm $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
@@ -195,6 +187,7 @@
echo " there is $SERVERDIR/sendfiled in makeconfig! Check it!"
fi
echo "installing the sendfile-daemon in $SERVERDIR"
+[ -x $SERVERDIR/sendfiled ] && mv $SERVERDIR/sendfiled $SERVERDIR/sendfiled.old
cp src/sendfiled $SERVERDIR || exit 1
NOSENDFILE=`dirname $DENY 2>/dev/null`/nosendfile
@@ -240,7 +233,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
@@ -253,8 +245,6 @@
fi
RESTART=true
echo "configuring $INETDCONF"
- echo "#" >>$INETDCONF
- echo "# simple asynchronous file transfer" >>$INETDCONF
echo "saft stream tcp nowait root $SFD" >>$INETDCONF
fi
@@ -278,7 +268,7 @@
echo "adding check_sendfile to /etc/csh.login"
echo >>/etc/csh.login
echo "test -x $BINDIR/check_sendfile && $BINDIR/check_sendfile" \
- >>/etc/profile
+ >>/etc/csh.login
fi
fi
@@ -318,15 +308,11 @@
EOD
fi
-echo
-echo "You may want to add the following line to your system bootup script:"
-echo " $SERVERDIR/sendfiled -Q"
-echo "This will start an outgoing spooling sendfile daemon on boot time"
-echo "which processes any old files in the outgoing spool."
-echo
+echo "[ -x $SERVERDIR/sendfiled ] && $SERVERDIR/sendfiled -Q && echo -n ' sendfiled'">${PREFIX}/etc/rc.d/sendfiled.sh
+chmod a+x ${PREFIX}/etc/rc.d/sendfiled.sh
if [ "$RESTART" = true ]; then
- echo
- echo "please restart now your inetd ( or simply reboot :-) )"
- echo
+ kill -HUP `ps auxw|awk '$11 == "inetd" { print $2 } '`
+ [ -f $SERVERDIR/sendfiled.old ] && rm -f $SERVERDIR/sendfiled.old
fi
+true
\ No newline at end of file