We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 375a4cd commit 1c64dc7Copy full SHA for 1c64dc7
1 file changed
ungrub/mkbootable
@@ -155,7 +155,7 @@ add_device() {
155
156
remove_device() {
157
if [[ "$DEV" = "missing" ]]; then
158
- TARGET=$(zpool status -P "$POOL" | awk '/was \/dev/ {print $1; exit}')
+ TARGET="$(zpool status -P "$pool" | awk '/^\t / && ($2 == "OFFLINE" || $2 == "REMOVED" || $2 == "UNAVAIL") { print $1; exit }')"
159
zpool detach "$POOL" "$TARGET"
160
else
161
zpool detach "$POOL" "$BOOT_PART"
0 commit comments