X-Git-Url: http://git.jankratochvil.net/?p=enbrace.git;a=blobdiff_plain;f=enbrace.bash;h=0ddb2c95eaf8993e4ce044f2b04537f8e12e4e9d;hp=3abb69b6432abfc59a21f0c4adcd9740975ccf80;hb=HEAD;hpb=a6e958ed6224a3fe7649d022ee04a5e44404ab73 diff --git a/enbrace.bash b/enbrace.bash index 3abb69b..0ddb2c9 100755 --- a/enbrace.bash +++ b/enbrace.bash @@ -2,14 +2,7 @@ # # $Id$ # -# cd;echo 'default login anonymous password short@' >~/.netrc;echo -e 'bi\nhash\ncd pub/priv/short/enbrace\nget enbrace.bash\nquit'|ftp vellum.cz;/usr/local/bin/bash enbrace.bash -# -# Patch multi-application liable files: -# [cs_CZ] Soubory citlive na vicenasobnou aplikaci patche: -# /etc/rc.local -# /root/.login -# /etc/inetd.conf -# /etc/crontab +# cd;echo 'default login anonymous password short@' >~/.netrc;echo -e 'bi\nhash\npass\ncd pub/priv/short/enbrace\nget enbrace.bash\nquit'|ftp vellum.cz;/usr/local/bin/bash enbrace.bash function fatal { @@ -48,6 +41,27 @@ EOF return 0 } +function dopatch +{ + cat >/root/enbrace/dopatch.diff + ( + echo "### $*";shift + if [ -d "$1" ];then + cd "$1";shift + fi + rev="$1" + [ "$rev" = rev ] && shift + forw="$1" + [ "$forw" = forw ] && shift + set +e + [ "$forw" != forw ] && while patch -RsNEp0 $* &1|tee -a /root/enbrace/dopatch.log + rm -f /root/enbrace/dopatch.diff +} + set -ex ( @@ -100,20 +114,51 @@ EOF echo "" echo "" EOF - cat >root-cshrc.diff <rc.local.diffrev + cat >root-cshrc.diffremoveold <root-cshrc.diffremovenew <root-cshrc.diffrev1 < /Lace +# Commented-out, must be placed in "~/.login"! +## /root/status/message/hint EOF - cat >root-login.diff <root-cshrc.diffrev2 + cat >root-cshrc.diff < /Lace ++# Commented-out, must be placed in "~/.login"! ++## /root/status/message/hint or /root/status/result/hint +EOF + cat >root-login.diffrev1 <root-login.diffrev2 + cat >root-login.diff < /Lace ++# Moved in from "~/.cshrc"! ++[ -x /root/status/message/hint ] && /root/status/message/hint ++[ -x /root/status/result/hint ] && /root/status/result/hint +EOF cat >root-mail.diff < /Lace ++# Commented-out the "ftp" line ++###ftp stream tcp nowait root /usr/libexec/ftpd ftpd -l + telnet stream tcp nowait root /usr/libexec/telnetd telnetd + shell stream tcp nowait root /usr/libexec/rshd rshd + login stream tcp nowait root /usr/libexec/rlogind rlogind @@ -65,3 +65,6 @@ # #netbios-ssn stream tcp nowait root /usr/local/sbin/smbd smbd @@ -209,9 +279,7 @@ EOF EOF # Sendmail - (cd / - patch -sENp0 &1|tee errs2 make install 2>&1|tee errs3 ) - patch -N /etc/rc.local &1|tee enbrace.`date '+%Y-%m-%d-%H:%M:%S'`.log