#! /bin/sh
# preinst script for s6-66-init

echo "making good environment path file"
auto_dir "/etc/66/environment/"
echo "PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/lib/execline/bin:/usr/lib/execline/bin:/usr/libexec" > /etc/66/environment/path

echo "make a seed file for tree boot"
auto_dir "${SEED_SYSADM}"
echo "allow = root
groups = boot
" > ${SEED_SYSADM}/boot

echo "Associating service boot@system to tree called boot"
66 -t boot enable boot@system

echo "Associating tree boot to group boot"
66 tree admin -o groups=boot boot

echo "Applying OOTB configurartion to service boot@system"
66 reconfigure boot@system

