|
root / base / usr / src / zyginit / services / filesystem / start.sh
start.sh Bash 27 lines 868 B
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/zsh
# filesystem — mount local filesystems + import ZFS pools
#
# mountall -l mounts all local-type entries from /etc/vfstab (idempotent
# — skips already-mounted). zpool import -a imports any pools on attached
# disks. ZFS filesystems with mountpoint set auto-mount.

set -e
set -u

# Mount everything in /etc/vfstab with mount-at-boot = yes, excluding /
/usr/sbin/mountall -l

# fdfs (file descriptor pseudo-fs) is in vfstab with mount-at-boot=no per
# illumos convention, but is required by dtrace -C (USDT probe compilation
# preprocesses .d scripts via fd 3 → /dev/fd/3). Mount it explicitly here;
# idempotent (skips if already mounted).
/usr/sbin/mount -F fd fd /dev/fd 2>/dev/null || true

# Import all ZFS pools visible to the system
/usr/sbin/zpool import -a || true

# Auto-mount ZFS filesystems with canmount=on
/usr/sbin/zfs mount -a

exit 0