git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version 1.10.11.
[libguestfs.git]
/
recipes
/
clone.sh
diff --git
a/recipes/clone.sh
b/recipes/clone.sh
index
d2b9d99
..
85acf1f
100755
(executable)
--- a/
recipes/clone.sh
+++ b/
recipes/clone.sh
@@
-1,15
+1,14
@@
#!/bin/sh -
#!/bin/sh -
-preimage="$1"
-newimage="$2"
-root="$3"
-nameserver="$4"
-hostname="$5"
+preimage="$1"
;# original guest
+newimage="$2"
;# new guest
+root="$3"
;# root filesystem
+nameserver="$4"
;# new nameserver
+hostname="$5"
;# new hostname
-dd if="$preimage" of="$newimage"
+dd if="$preimage" of="$newimage"
bs=1M
guestfish -a "$newimage" -m "$root" <<EOF
guestfish -a "$newimage" -m "$root" <<EOF
-write /etc/resolv.conf "nameserver $nameserver"
-write /etc/HOSTNAME "$hostname"
-sync
+ write /etc/resolv.conf "nameserver $nameserver"
+ write /etc/HOSTNAME "$hostname"
EOF
EOF