From: short <> Date: Fri, 5 Apr 2002 06:50:20 +0000 (+0000) Subject: enbrace is now multi-application resistant X-Git-Url: http://git.jankratochvil.net/?p=enbrace.git;a=commitdiff_plain;h=a591eca7c0eef078149cd9ef038db38f6a7ef9bd enbrace is now multi-application resistant - all known old patches in the past integrated as the "reverse"s Autodetect calling of "/root/status/message/hint" vs. "/root/status/result/hint" - "/root/status/result/hint" present at least on kolar_ihc (194.213.51.34) Log of all patching is diplayed before the final "success" message [cs_CZ] enbrace je jiz nyni odolny vuci vicenasobne aplikaci - vsechny zname starsi patche byly integrovany jako "reverze" Autodetekce volani "/root/status/message/hint" vs. "/root/status/result/hint" - "/root/status/result/hint" pouzit alespon na kolar_ihc (194.213.51.34) Log vsech patchovani je zobrazen pred koncovou "success" zpravou --- diff --git a/enbrace.bash b/enbrace.bash index 6888482..1cc0351 100755 --- a/enbrace.bash +++ b/enbrace.bash @@ -3,13 +3,6 @@ # $Id$ # # 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 -# -# Patch multi-application liable files: -# [cs_CZ] Soubory citlive na vicenasobnou aplikaci patche: -# /etc/rc.local -# /root/.login -# /etc/inetd.conf -# /etc/crontab 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 <&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