After some more debugging, it seems to be a behavior change in dash between Xenial:
# /bin/sh -c 'read cur_status < /sys/block/md0/md/sync_action; echo $cur_status' i # /bin/bash -c 'read cur_status < /sys/block/md0/md/sync_action; echo $cur_status' idle
And Trusty:
# /bin/sh -c 'read cur_status < /sys/block/md0/md/sync_action; echo $cur_status' idle # /bin/bash -c 'read cur_status < /sys/block/md0/md/sync_action; echo $cur_status' idle
After some more debugging, it seems to be a behavior change in dash between Xenial:
# /bin/sh -c 'read cur_status < /sys/block/ md0/md/ sync_action; echo $cur_status' md0/md/ sync_action; echo $cur_status'
i
# /bin/bash -c 'read cur_status < /sys/block/
idle
And Trusty:
# /bin/sh -c 'read cur_status < /sys/block/ md0/md/ sync_action; echo $cur_status' md0/md/ sync_action; echo $cur_status'
idle
# /bin/bash -c 'read cur_status < /sys/block/
idle