Closed
Description
Describe the problem you're observing
See cmd/zed/zed.d/zed.d/pool_import-led.sh
:
cmd='echo led_token=$(cat "$VDEV_ENC_SYSFS_PATH/fault"),"$VDEV_ENC_SYSFS_PATH",'
out=$($ZPOOL status -vc "$cmd" "$pool" | grep 'led_token=')
This will simply never work: -c
takes script names nowadays, and silently ignores this argument (if only because it has a slash in it).
Describe how to reproduce the problem
This appears to date back to the original implementation by @tonyhutter in b291029 (Fri Feb 10 16:09:45 2017 -0800), and the commands used to be run using popen(3), which passes them through /bin/sh -c
. This has obviously changed, but the ZEDLET hasn't, and, according to the comment at the top, is now broken for pool_import
events, which are the only ones that hit this fallback.