Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

Теперь Вы можете запустить его в формате ./create_zone.sh <zone-name> <zone-ip-domain> <zone-ip-node> , например!:

./create_zone.sh zone02 192.168.0 3

...

Code Block
languagebash
cat > prepare.sh <<EOT
#!/bin/bash
WORKSPACE=/export/home/admin/du2

apt-get clean
apt-get autoclean
apt-get remove libiconv-dev -y

apt-get install -y acl iputils-ping kbd ksh scheduler system-data-console-fonts
apt-get install -y traceroute gmake build-essential man-db po-debconf po4a debhelper
apt-get install -y libx11-6 libxi6 libxtst6 liblua5.2-dev libnghttp2-dev libjansson-dev
apt-get install -y mawk doxygen graphviz libdb-dev libgdbm-dev libsqlite3-dev libpq-dev
apt-get install -y bison dh-exec cmake docbook-xml docbook-xsl libgtest-dev

#/usr/bin/ln -fs libX11.so.6 /usr/lib/64/libX11.so.4
#/usr/bin/ln -fs libXi.so.6 /usr/lib/64/libXi.so.5
#/usr/bin/ln -fs libXtst.so.6 /usr/lib/64/libXtst.so.1

cp /etc/apt/sources.list /etc/apt/sources.list.bak
echo "" > /etc/apt/sources.list
echo "deb [trusted=yes] http://192.168.0.2/dilos du2-prebuild main contrib non-free" >> /etc/apt/sources.list
echo "deb-src [trusted=yes] http://192.168.0.2/dilos du2-prebuild main contrib non-free" 2>/dev/null >> /etc/apt/sources.list
cp /etc/apt/sources.list /etc/apt/sources.list.dev

apt-get update -y

test#test -f /var/lib/dpkg/lock && rm -f /var/lib/dpkg/lock
test#test -f /var/cache/apt/archives/lock && rm -f /var/cache/apt/archives/lock
dpkg#dpkg --configure -a
rm -rf \${WORKSPACE} && mkdir -p \${WORKSPACE}

apt-get upgrade -y

env DEBIAN_FRONTEND=noninteractive apt-get install -y -f
env DEBIAN_FRONTEND=noninteractive apt-get install -y git openssh-server
EOT

...