<commit_before>#!/bin/sh
# usage:
# curl http://openqa.suse.de/sle/qatests/qa_openstack.sh | sh -x
# needs 2.1GB space for /var/lib/{glance,nova}
interfaces="eth0 br0"
export MODE=kvm
# nested virt is awfully slow, so we do:
MODE=lxc
if ! grep -q -e vmx -e svm /proc/cpuinfo ; then
	MODE=lxc
fi
ARCH=$(uname -i)

ifconfig | grep inet

# setup optional extra disk
dev=/dev/vdb
if ! test -e $dev && file -s /dev/sdb|grep -q "ext3 filesystem data" ; then
    dev=/dev/sdb
fi
if test -e $dev ; then #&& file -s $dev | grep -q "/dev/vdb: data" ; then
    file -s $dev | grep -q "ext3 filesystem" || mkfs.ext3 $dev
    mount $dev /mnt/
    cp -a /var/lib/* /mnt/
    mount --make-private /
    mount --move /mnt /var/lib
    echo $dev /var/lib ext3 noatime,barrier=0,data=writeback 2 1 >> /etc/fstab
fi
mount -o remount,noatime,barrier=0 /

# setup repos
VERSION=11
REPO=SLE_11_SP3
if grep "^VERSION = 1[2-4]\\.[0-5]" /etc/SuSE-release ; then
  VERSION=$(awk -e '/^VERSION = 1[2-4]\./{print $3}' /etc/SuSE-release)
  REPO=openSUSE_$VERSION
fi
hostname=dist.suse.de<commit_msg>Only add to /etc/fstab if not already there<commit_after>#!/bin/sh
# usage:
# curl http://openqa.suse.de/sle/qatests/qa_openstack.sh | sh -x
# needs 2.1GB space for /var/lib/{glance,nova}
interfaces="eth0 br0"
export MODE=kvm
# nested virt is awfully slow, so we do:
MODE=lxc
if ! grep -q -e vmx -e svm /proc/cpuinfo ; then
	MODE=lxc
fi
ARCH=$(uname -i)

ifconfig | grep inet

# setup optional extra disk
dev=/dev/vdb
if ! test -e $dev && file -s /dev/sdb|grep -q "ext3 filesystem data" ; then
    dev=/dev/sdb
fi
if test -e $dev ; then #&& file -s $dev | grep -q "/dev/vdb: data" ; then
    file -s $dev | grep -q "ext3 filesystem" || mkfs.ext3 $dev
    mount $dev /mnt/
    cp -a /var/lib/* /mnt/
    mount --make-private /
    mount --move /mnt /var/lib
    if ! grep -qw /var/lib /etc/fstab; then
        echo $dev /var/lib ext3 noatime,barrier=0,data=writeback 2 1 >> /etc/fstab
    fi
fi
mount -o remount,noatime,barrier=0 /

# setup repos
VERSION=11
REPO=SLE_11_SP3
if grep "^VERSION = 1[2-4]\\.[0-5]" /etc/SuSE-release ; then
  VERSION=$(awk -e '/^VERSION = 1[2-4]\./{print $3}' /etc/SuSE-release)
  REPO=openSUSE_$VERSION
fi
hostname=dist.suse.de
{'fraction_non_alphanumeric': 0.1649438202247191, 'fraction_numerical': 0.023370786516853932, 'mean_word_length': 2.9398230088495576, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5372734', 'n_tokens_mistral': 975, 'n_tokens_neox': 927, 'n_words': 263}