X-Git-Url: http://git.jankratochvil.net/?p=enbrace.git;a=blobdiff_plain;f=enbrace.bash;h=1cc0351fdf501026088da1a5a5c4ccdb5bf30b2a;hp=6888482ed641fce2e31575dc72bf5b3920ca2798;hb=a591eca7c0eef078149cd9ef038db38f6a7ef9bd;hpb=0aad3c25e0e85983ef3e5b1f2beb5c3a6917f8e5 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