X-Git-Url: http://git.jankratochvil.net/?p=enbrace.git;a=blobdiff_plain;f=enbrace.bash;h=3abb69b6432abfc59a21f0c4adcd9740975ccf80;hp=b2924c582ecdfee38fef139d25744702927b0e46;hb=a6e958ed6224a3fe7649d022ee04a5e44404ab73;hpb=581874aad59772836b4a1783389d5a639e8dfbde diff --git a/enbrace.bash b/enbrace.bash index b2924c5..3abb69b 100755 --- a/enbrace.bash +++ b/enbrace.bash @@ -3,6 +3,13 @@ # $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 function fatal { @@ -10,10 +17,10 @@ function fatal exit 1 } -if [ "$USER" != "root" ];then fatal "This script must be run as 'root'" ;fi -if [ "$PWD" != "/root" ];then fatal "This script must be run from directory '/root'" ;fi -if [ "$0" != "enbrace.bash" ];then fatal "This script must be named 'enbrace.bash'" ;fi -if [ -e "enbrace" ];then fatal "'/root/enbrace' directory already exists" ;fi +if [ "$USER" != "root" ];then fatal "This script must be run as 'root'" ;fi +if [ "$PWD" != "/root" ];then fatal "This script must be run from directory '/root'" ;fi +if [ "`basename "$0"`" != "enbrace.bash" ];then fatal "This script must be named 'enbrace.bash'" ;fi +if [ -e "enbrace" ];then fatal "'/root/enbrace' directory already exists" ;fi function ftpget { @@ -24,6 +31,7 @@ default prom bi hash + pass EOF if [ $# != 1 ];then fatal "ftpget(): (arg1=URL) required!";fi @@ -36,7 +44,7 @@ EOF echo -n "Using already downloaded file \"$1\": ";ls -l "$file" return 0 fi - echo -e "cd \"$dir\"\\nget \"$file\"\\nquit"|ftp "$host" + echo -e "cd \"$dir\"\\nget \"$file\"\\nquit"|ftp -v "$host" return 0 } @@ -45,8 +53,8 @@ set -ex ( # Config - openssl="ftp://ftp.openssl.org/source/openssl-0.9.6b.tar.gz" - openssh="ftp://ftp1.se.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-3.0p1.tar.gz" + openssl="ftp://ftp.openssl.org/source/openssl-0.9.6c.tar.gz" + openssh="ftp://ftp1.se.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-3.1p1.tar.gz" # Init chmod +x enbrace.bash @@ -163,10 +171,46 @@ EOF +# Jan Kolar /Lace +*/30 * * * * root /usr/sbin/sendmail -q EOF + cat >openssh-3.1p1-i386-unknown-freebsd2.2.5.diff <>confdefs.h <<\_ACEOF ++#define HAVE_BOGUS_SYS_QUEUE_H 1 ++_ACEOF ++ + ;; + *-next-*) + conf_lastlog_location="/usr/adm/lastlog" +--- defines.h-orig Wed Feb 27 03:40:49 2002 ++++ defines.h Thu Apr 4 01:00:56 2002 +@@ -146,7 +146,7 @@ + including rpc/rpc.h breaks Solaris 6 + */ + #ifndef INADDR_LOOPBACK +-#define INADDR_LOOPBACK ((ulong)0x7f000001) ++#define INADDR_LOOPBACK ((unsigned long)0x7f000001) + #endif + + /* Types */ +EOF # Sendmail (cd / - patch -sEp0 &1|tee errs2 make install 2>&1|tee errs3 ) - patch /etc/rc.local &1|tee enbrace.`date '+%Y-%m-%H-%H:%M:%S'`.log +) 2>&1|tee enbrace.`date '+%Y-%m-%d-%H:%M:%S'`.log +