# root-fs — Ensure root filesystem is mounted read-write
#
# Tier 0: no dependencies. First oneshot to run.
#
# On illumos with ZFS root, the kernel mounts the root dataset read-write
# at boot via the bootloader; there is no remount step like UFS-era systems.
# This service defensively asserts readonly=off on the active root dataset
# so any prior bootloader/admin override is corrected before later tiers
# write to /.
#
# Reverses at shutdown: stop.sh sets readonly=on as a defensive measure
# before halt/poweroff/reboot so the next boot starts from a clean state.

[service]
name = "root-fs"
description = "Ensure root filesystem is writable (ZFS root)"
type = "oneshot"

[exec]
start = "/etc/zyginit/root-fs/start.sh"
stop = "/etc/zyginit/root-fs/stop.sh"

[runlevel]
# Essential — required in both single-user and multi-user.
mode = "always"

[restart]
on = "never"
