<commit_before>#!/bin/bash -x

if [ $# -ne  3 ]; then
	echo "Usage: $0 <VEID> <Hostname> <IP-Address>"
	exit 1
fi

VEID=$1
HN=$2
IP=$3
VEROOT=/var/lib/vz/private/$VEID

echo "VEID: $VEID"
echo "Hostname: $HN"
echo "IP: $IP"
echo "VEROOT: $VEROOT"
echo "Is this fine?"

read lala

exit

check_rc() {
RC=$?
if [ $RC -gt 0 ]; then
        echo "Failed in $1, RC was $RC. Bailing out"
        exit 1
fi
}

 
vzctl create $VEID --ipadd $IP --hostname $HN --ostemplate debian-4.1-bootstrap
check_rc "vzctl create"

debootstrap --exclude=dhcp-client,dhcp3-client,dhcp3-common,dmidecode,gcc-4.2-base,nano,module-init-tools,tasksel,tasksel-data,libdb4.4,libsasl2-2,libgnutls26,libconsole,libgnutls13,libtasn1-3,liblzo2-2,libopencdk10,libgcrypt11 --include=vim,mailx,mtr-tiny,screen,strace,ltrace,telnet,dnsutils,file,less,iptraf,lsof,rsync,unattended-upgrades,etckeeper --arch amd64 lenny $VEROOT http://ftp.at.debian.org/debian
check_rc "debootstrap"

perl -pi -e 's\^(?!#)(.*/sbin/getty)\#$1\' $VEROOT/etc/inittab<commit_msg>20:48 < hvr> hrm... kann ein '$?' eigentlich immer nur positiv sein?<commit_after>#!/bin/bash -x

if [ $# -ne  3 ]; then
	echo "Usage: $0 <VEID> <Hostname> <IP-Address>"
	exit 1
fi

VEID=$1
HN=$2
IP=$3
VEROOT=/var/lib/vz/private/$VEID

echo "VEID: $VEID"
echo "Hostname: $HN"
echo "IP: $IP"
echo "VEROOT: $VEROOT"
echo "Is this fine?"

read lala

exit

check_rc() {
RC=$?
if [ $RC -ne 0 ]; then
        echo "Failed in $1, RC was $RC. Bailing out"
        exit 1
fi
}

 
vzctl create $VEID --ipadd $IP --hostname $HN --ostemplate debian-4.1-bootstrap
check_rc "vzctl create"

debootstrap --exclude=dhcp-client,dhcp3-client,dhcp3-common,dmidecode,gcc-4.2-base,nano,module-init-tools,tasksel,tasksel-data,libdb4.4,libsasl2-2,libgnutls26,libconsole,libgnutls13,libtasn1-3,liblzo2-2,libopencdk10,libgcrypt11 --include=vim,mailx,mtr-tiny,screen,strace,ltrace,telnet,dnsutils,file,less,iptraf,lsof,rsync,unattended-upgrades,etckeeper --arch amd64 lenny $VEROOT http://ftp.at.debian.org/debian
check_rc "debootstrap"

perl -pi -e 's\^(?!#)(.*/sbin/getty)\#$1\' $VEROOT/etc/inittab
{'fraction_non_alphanumeric': 0.17455762792922047, 'fraction_numerical': 0.03443328550932568, 'mean_word_length': 4.638814016172507, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '438284', 'n_tokens_mistral': 977, 'n_tokens_neox': 920, 'n_words': 176}