3 # cd;echo 'default login anonymous password short@' >~/.netrc;echo -e 'bi\nhash\ncd pub/priv\nget enbrace.bash\nquit'|ftp atrey.karlin.mff.cuni.cz;/usr/local/bin/bash enbrace.bash
11 if [ "$USER" != "root" ];then fatal "This script must be run as 'root'" ;fi
12 if [ "$PWD" != "/root" ];then fatal "This script must be run from directory '/root'" ;fi
13 if [ "$0" != "enbrace.bash" ];then fatal "This script must be named 'enbrace.bash'" ;fi
14 if [ -e "enbrace" ];then fatal "'/root/enbrace' directory already exists" ;fi
20 login anonymous password short@
27 if [ $# != 1 ];then fatal "ftpget(): (arg1=URL) required!";fi
28 host="`echo "$1"|sed 's#^ftp://\([^/]*\)/.*$#\1#'`"
29 dir="` echo "$1"|sed 's#^ftp://[^/]*\(/.*/\)[^/]*$#\1#'`"
30 file="`echo "$1"|sed 's#^.*/\([^/]*\)$#\1#'`"
31 base="`basename "$file" .tar.gz`"
32 if gzip -t "../$file" 2>/dev/null;then
34 echo -n "Using already downloaded file \"$1\": ";ls -l "$file"
37 echo -e "cd \"$dir\"\\nget \"$file\"\\nquit"|ftp "$host"
46 openssl="ftp://ftp.openssl.org/source/openssl-0.9.6b.tar.gz"
47 openssh="ftp://ftp1.se.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-2.9p2.tar.gz"
60 cat >httpd.conf.diff <<EOF
61 --- httpd.conf-orig Fri Dec 17 01:39:20 1999
62 +++ httpd.conf Fri Aug 17 01:13:47 2001
66 #Allow from .your_domain.com
71 + Allow from 10.0.0.0/255.0.0.0
76 cat >rc.local.diff <<EOF
77 --- rc.local-orig Mon Sep 3 19:12:24 2001
78 +++ rc.local Mon Sep 3 19:15:48 2001
80 echo "Server Adminstration Program started...."
83 +# Jan Kolar <videoprogress@mbox.cz> /Lace
84 +echo "Starting OpenSSH service...."
86 +echo "OpenSSH service started...."
96 rm -rf /usr/local/openssl*
99 ./config --prefix=/usr/local --openssldir=/usr/local/"$base" 2>&1|tee errs1
101 make test 2>&1|tee errs2a
102 make install 2>&1|tee errs3
104 ln -s "$base" /usr/local/openssl
111 ./configure --with-ipv4-default 2>&1|tee errs1
113 make install 2>&1|tee errs3
115 patch /etc/rc.local <rc.local.diff
119 patch /usr/local/etc/httpd/conf/httpd.conf <httpd.conf.diff
123 for i in /usr/local/etc/*_key;do
124 echo -n "$i: ";/usr/local/bin/ssh-keygen -l -f $i
129 ) 2>&1|tee enbrace.`date '+%Y-%m-%H-%H:%M:%S'`.log