smartos

pkgin in python27 coreutils sudo

Example script:
#!/bin/bash

export SUDO=/opt/local/bin/sudo
export PYTHON=/opt/local/bin/python2.7
export TRUNCATE=/opt/local/bin/truncate
export GNUDD=/opt/local/bin/gdd

ARGS="$*"

if [ "x$ARGS" = "x" ]; then
	ARGS="-c /opt/dilos.run"
fi

export DISKS="c4t0d0 c3t0d0 c2t0d0"
export KEEP="zones fakeroot rpool"

LOG=$(date +'%Y%m%d-%H%M')

# fix from smartos based env
sudo umount /etc/shadow
sudo cp -f /usbkey/shadow /etc/shadow

# fix dump and swap
DUMPDEV=$(sudo dumpadm | grep "Dump device:" | nawk '{print $3}')
if [ "$DUMPDEV" = "none" ]; then
	sudo dumpadm -d /dev/zvol/dsk/zones/dump
fi

SWAPDEV=$(sudo swap -l 2>&1)
if [ "$SWAPDEV" = "No swap devices configured" ]; then
	sudo /usr/sbin/swap -a /dev/zvol/dsk/zones/swap
fi

#
time /opt/zfs-tests/bin/zfstest $ARGS 2>&1 | tee /var/tmp/${LOG}.zt.log.txt