#!/bin/sh -e
# telinit / runleveld under s6-linux-init → 66 tree start

PATH=/usr/bin:/usr/sbin:/bin:/sbin
export PATH
VERBOSITY="${VERBOSITY:-2}"

test "$#" -gt 0 || { echo 'runlevel: fatal: too few arguments' 1>&2 ; exit 100 ; }

TREE="$1"
case "$TREE" in
	''|default)
		66 -v"$VERBOSITY" tree start default
		exec 66 -v"$VERBOSITY" tree start
		;;
	*)
		exec 66 -v"$VERBOSITY" tree start "$TREE"
		;;
esac
