|
root / examples / oneshot-setup
oneshot-setup Plain Text 22 lines 663 B
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# Example: oneshot setup task.
#
# Runs once at boot, expected to exit quickly with status 0.
# zyginit considers a successful oneshot "online" for dependency purposes.

[service]
type = "oneshot"
description = "Mount additional filesystems (oneshot setup)"

[exec]
# A path beginning with "./" resolves relative to this service's directory,
# so the helper script lives at examples/oneshot-setup/start.sh.
start = "./start.sh"

[dependencies]
# Run after root-fs is online. zyginit topologically sorts services into
# tiers based on these dependencies.
requires = ["root-fs"]
#!/bin/sh
# Mount everything in /etc/vfstab that's not already mounted.
exec mountall