mirror_zfs/contrib
Turbo Fredriksson b86f15d84b Fix issue with finding degraded pool(s).
When a pool is degraded, or needs special action, the `zpool import`
(without pool to import) line will report:
```
  pool: rpool
    id: 01234567890123456789
 state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:
   [..]
```
If the import with the pool name fails, it is supposed to try importing
using the pool ID.

However, the script is also getting the `action` line (and probably `scrub:`
if/when that's available):
  pool; The pool can be imported using its name or numeric identifier.;config:;
which causes issues on consequent import attempts.

Cleanup the information by rewriting the `sed` command line.

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <robn@despairlabs.com>
Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
Closes #18000
2026-02-10 16:56:09 -08:00
..
bash_completion.d Updating bash completion build file 2024-08-08 15:39:25 -07:00
bpftrace Replace EXTRA_DIST with dist_noinst_DATA 2022-05-26 09:24:50 -07:00
coverity Coverity Model Update 2022-11-29 10:00:56 -08:00
debian Bump SONAME of libzfs and libzpool 2025-11-12 13:07:28 -08:00
dracut contrib: dracut: install dependent kernel modules 2025-09-25 12:08:02 -07:00
icp/gcm-simd/boringssl Backport AVX2 AES-GCM implementation from BoringSSL 2025-08-13 14:51:20 -07:00
initramfs Fix issue with finding degraded pool(s). 2026-02-10 16:56:09 -08:00
intel_qat docs: fix a few small typos (#17804) 2025-10-21 09:50:43 -07:00
pam_zfs_key Update pam_zfs_key.c defaultt path for FreeBSD 2025-09-09 17:04:06 -07:00
pyzfs CI: Remove Buildbot references 2025-09-29 16:50:35 -07:00
zcp Replace EXTRA_DIST with dist_noinst_DATA 2022-05-26 09:24:50 -07:00
Makefile.am Fix missing packaging files from release tarballs 2024-10-04 11:18:08 -07:00