summaryrefslogtreecommitdiffstats
path: root/guestfish.pod
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2009-06-24 09:59:39 +0100
committerRichard W.M. Jones <rjones@redhat.com>2009-06-24 09:59:39 +0100
commit46551d9c51193a4bca2e1b249b8c5f111e1dc7b5 (patch)
tree2beb1f4b3bc56eb54e377bcfccde6898c94e212c /guestfish.pod
parent94a49c8207277ec4017a0fb9a3cd8f1e61a518f6 (diff)
downloadlibguestfs-46551d9c51193a4bca2e1b249b8c5f111e1dc7b5.tar.gz
libguestfs-46551d9c51193a4bca2e1b249b8c5f111e1dc7b5.tar.xz
libguestfs-46551d9c51193a4bca2e1b249b8c5f111e1dc7b5.zip
Implement guestfish -f option to allow guestfish scripts.
New '-f' option allows scripts to be written using: #!/usr/bin/guestfish -f
Diffstat (limited to 'guestfish.pod')
-rw-r--r--guestfish.pod18
1 files changed, 16 insertions, 2 deletions
diff --git a/guestfish.pod b/guestfish.pod
index d83a61ca..2d39cbf4 100644
--- a/guestfish.pod
+++ b/guestfish.pod
@@ -40,8 +40,7 @@ Remove C</boot/grub/menu.lst> (in reality not such a great idea):
guestfish --add disk.img \
--mount /dev/VolGroup00/LogVol00 \
--mount /dev/sda1:/boot \
- rm /boot/grub/menu.lst : \
- sync : exit
+ rm /boot/grub/menu.lst
=head2 As an interactive shell
@@ -55,6 +54,14 @@ Remove C</boot/grub/menu.lst> (in reality not such a great idea):
><fs> help
+=head2 As a script interpreter
+
+ #!/usr/bin/guestfish -f
+ alloc /tmp/output.img 10M
+ run
+ sfdisk /dev/sda 0 0 0 ,
+ mkfs ext2 /dev/sda1
+
=head1 DESCRIPTION
Guestfish is a shell and command-line tool for examining and modifying
@@ -81,6 +88,13 @@ Displays detailed help on a single command C<cmd>.
Add a block device or virtual machine image to the shell.
+=item B<-f file> | B<--file file>
+
+Read commands from C<file>. To write pure guestfish
+scripts, use:
+
+ #!/usr/bin/guestfish -f
+
=item B<-m dev[:mountpoint]> | B<--mount dev[:mountpoint]>
Mount the named partition or logical volume on the given mountpoint.