#!/bin/bash set -e${ADT_SHELLX} adt_host_hostname=$1 adt_guest_hostname=$2 adt_host_ipaddr=$3 adt_guest_ipaddr=$4 adt_fs_type=$5 adt_normaluser=$6 adt_provideswap=$7 echo '(---' cd /root if test -f /etc/lsb-release; then . /etc/lsb-release if [ "x$DISTRIB_ID" = xUbuntu ]; then perl -i~ -pe 's/ main$/ main universe/ if m/^deb http/' \ /etc/apt/sources.list fi fi ldconfig cat >/etc/fstab <>/etc/fstab </etc/network/interfaces </etc/hostname essc=/etc/ssh/sshd_config perl -wne ' BEGIN { $pep= PermitEmptyPasswords; $want= "$pep no\n"; $done= 0; } if (m/^\s*$pep/oi) { $_= $want; $done= 1; } $o .= $_; END { print $want or die $! unless $done; print $o or die $!; } ' $essc >$essc.new mv $essc.new $essc if [ x"$adt_normaluser" != x ]; then adduser --gecos 'adtxenlvm testing normal user account' \ --disabled-password ${adt_normaluser} fi apt-get update apt-get install libc6-xen ||: echo '---)'