summaryrefslogtreecommitdiffstats
path: root/etc/systemd/system/zfs-import-cache.service.in
diff options
context:
space:
mode:
Diffstat (limited to 'etc/systemd/system/zfs-import-cache.service.in')
-rw-r--r--etc/systemd/system/zfs-import-cache.service.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/systemd/system/zfs-import-cache.service.in b/etc/systemd/system/zfs-import-cache.service.in
index 73f77e989..8087a294d 100644
--- a/etc/systemd/system/zfs-import-cache.service.in
+++ b/etc/systemd/system/zfs-import-cache.service.in
@@ -13,7 +13,7 @@ ConditionPathExists=@sysconfdir@/zfs/zpool.cache
Type=oneshot
RemainAfterExit=yes
ExecStart=@sbindir@/zpool import -c @sysconfdir@/zfs/zpool.cache -aN
-ExecStartPost=/bin/sh -c "/bin/systemctl set-environment BOOTFS=$(@sbindir@/zpool list -H -o bootfs | /bin/awk '$1 != \"-\" {print; exit}')"
+ExecStartPost=/bin/sh -c "/bin/systemctl set-environment BOOTFS=$(@sbindir@/zpool list -H -o bootfs | grep -m1 -v '^-$')"
[Install]
WantedBy=zfs-import.target