summaryrefslogtreecommitdiff
path: root/lib/util.sh
blob: 42d21dd50188252753ea6e2273b2cd690606554b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

. "$ktest_dir/lib/common.sh"

check_root_image_exists()
{
    if [[ -z $ktest_root_image ]]; then
	if [[ -f $HOME/.ktest/root.$DEBIAN_ARCH ]]; then
	    ktest_root_image="$HOME/.ktest/root.$DEBIAN_ARCH"
	elif [[ -f /var/lib/ktest/root.$DEBIAN_ARCH ]]; then
	    ktest_root_image=/var/lib/ktest/root.$DEBIAN_ARCH
	else
	    echo "Root image not found in $HOME/.ktest/root.$DEBIAN_ARCH or /var/lib/ktest/root.$DEBIAN_ARCH"
	    echo "Use $ktest_dir/root_image create"
	    exit 1
	fi
    fi
}