[Main]
Type = oneshot
Version = 0.1.2
Description = "live-config oneshot"
User = ( root )
Depends = ( mount-rw )
Options = ( !log )
InTree = mount

[Start]
Execute = (
	# After mount-rw (root may be RO until then). Same tree as mount-rw so
	# ordering is local — the live tree/stub name collision left live-config
	# unstarted and /var/lib/live/config empty on live boots.
	# Do not use `if -t`: that swallows live-config failures and boot continues
	# without a live user (nodm then falls back to root).
	foreground { mkdir -p /var/log/live /run /tmp }
	ifelse -n { test -x /bin/live-config }
	{
		foreground {
			redirfd -w 1 /run/live-config.status
			echo missing-bin
		}
		foreground { echo live-config: /bin/live-config missing }
		exit 1
	}
	/bin/live-config start
)
