configure: Add --with-extra flag to allow setting the extra version string.
[libguestfs.git] / recipes / clone.sh
1 #!/bin/sh -
2
3 preimage="$1"    ;# original guest
4 newimage="$2"    ;# new guest
5 root="$3"        ;# root filesystem
6 nameserver="$4"  ;# new nameserver
7 hostname="$5"    ;# new hostname
8
9 dd if="$preimage" of="$newimage" bs=1M
10
11 guestfish -a "$newimage" -m "$root" <<EOF
12   write /etc/resolv.conf "nameserver $nameserver"
13   write /etc/HOSTNAME "$hostname"
14 EOF