Skip to content

Commit 332b22b

Browse files
committed
lsof -t "$ROOTFS_DIR" | xargs -r kill -9
1 parent 0f6668b commit 332b22b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ umount_swap(){
101101
}
102102
umount_rootfs_all(){
103103
[ -f "$ROOTFS_LOCK" ] || fail "rootfs is not mounted."
104-
kill -9 $(lsof -t "$ROOTFS_DIR")
104+
lsof -t "$ROOTFS_DIR" | xargs -r kill -9 # -r, --no-run-if-empty
105105
for d in /dev/pts /dev /proc /sys /tmp; do
106106
umount "$ROOTFS_DIR/$d" 2>/dev/null
107107
done

0 commit comments

Comments
 (0)