mirror_zfs/contrib/initramfs/scripts
Turbo Fredriksson 94975ff79b 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
2025-12-16 09:15:51 -08:00
..
local-top contrib/initramfs: use LVM autoactivation for activating VGs (#17125) 2025-04-01 16:07:46 -07:00
.gitignore contrib/initramfs: switch to automake 2017-11-07 14:53:57 -08:00
zfs Fix issue with finding degraded pool(s). 2025-12-16 09:15:51 -08:00