fish: docs: note how to clean up the remote process properly.
[libguestfs.git] / fish / guestfish.pod
index 696d3b3..8190969 100644 (file)
@@ -996,14 +996,15 @@ and cleans up guestfish when the script exits:
      exit 1
  fi
  
kill_guestfish ()
cleanup_guestfish ()
  {
-     kill $GUESTFISH_PID >/dev/null 2>&1 ||:
+     guestfish --remote -- exit >/dev/null 2>&1 ||:
  }
- trap kill_guestfish EXIT
+ trap cleanup_guestfish EXIT ERR
  
- guestfish --remote run
- # etc.
+ guestfish --remote -- run
+ # ...
 
 =head2 REMOTE CONTROL RUN COMMAND HANGING
 
@@ -1283,6 +1284,7 @@ L<virt-make-fs(1)>,
 L<virt-rescue(1)>,
 L<virt-resize(1)>,
 L<virt-sparsify(1)>,
+L<virt-sysprep(1)>,
 L<virt-tar(1)>,
 L<virt-tar-in(1)>,
 L<virt-tar-out(1)>,