#!/bin/sh

# drop anything automounted
mount | grep 'uhelper=udisks2' | cut -f1 -d' ' | xargs -r umount --||:

export ALTERATOR_DESTDIR="/mnt/destination"

# see also installer-scripts-remount-stage2
if [ -d /dev/evms/.nodes ]; then
	mdadm --stop --scan
	dmsetup remove_all
fi

service alteratord restart

alterator-wizard -f /etc/livecd-install/steps
