#!/usr/local/bin/bash

# Copyright (c) 2016 Joyent Inc., All rights reserved.
# For scripts that should be run on first boot only

# load common functions and vars
. /usr/local/lib/smartdc/common.lib

# Set root password if root_pw is set in the image manifest
(/usr/local/lib/smartdc/set-rootpassword)

# Format disk
(/usr/local/lib/smartdc/format-secondary-disk)

# Disable firstboot once all scripts are run
lib_triton_info "Disabling firstboot"
touch /usr/local/lib/smartdc/.firstboot-complete-do-not-delete

exit 0
