Revision 5cbb15b9
b/snf-image-host/Makefile.am | ||
---|---|---|
35 | 35 |
-e 's|@LOSETUP[@]|$(LOSETUP)|g' \ |
36 | 36 |
-e 's|@KPARTX[@]|$(KPARTX)|g' \ |
37 | 37 |
-e 's|@SFDISK[@]|$(SFDISK)|g' \ |
38 |
-e 's|@QEMU_IMG[@]|$(QEMU_IMG)|g' \ |
|
38 | 39 |
-e 's|@INSTALL_MBR[@]|$(INSTALL_MBR)|g' \ |
39 |
-e 's|@progress_monitor_support[@]|$(progress_monitor_support)|g' \
|
|
40 |
-e 's|@PROGRESS_MONITOR[@]|$(PROGRESS_MONITOR)|g'
|
|
40 |
-e 's|@PROGRESS_MONITOR[@]|$(PROGRESS_MONITOR)|g' \
|
|
41 |
-e 's|@progress_monitor_support[@]|$(progress_monitor_support)|g'
|
|
41 | 42 |
|
42 | 43 |
%:%.in Makefile |
43 | 44 |
rm -f $@ $@.tmp |
b/snf-image-host/common.sh.in | ||
---|---|---|
31 | 31 |
KPARTX="kpartx" |
32 | 32 |
LOSETUP="losetup" |
33 | 33 |
SFDISK="sfdisk" |
34 |
PROGRESS_MONITOR="snf-progress-monitor"
|
|
34 |
QEMU_IMG="qemu-img"
|
|
35 | 35 |
INSTALL_MBR="install-mbr" |
36 | 36 |
TIMELIMIT="timelimit" |
37 |
PROGRESS_MONITOR="snf-progress-monitor" |
|
37 | 38 |
|
38 | 39 |
progress_monitor_support="@progress_monitor_support@" |
39 | 40 |
|
b/snf-image-host/configure.ac | ||
---|---|---|
102 | 102 |
AC_MSG_ERROR([sfdisk not found in $PATH:/usr/sbin:/sbin]) |
103 | 103 |
fi |
104 | 104 |
|
105 |
AC_PATH_PROG(QEMU_IMG, [qemu-img], [], [$PATH:/usr/sbin:/sbin]) |
|
106 |
if test -z "$QEMU_IMG" ; then |
|
107 |
AC_MSG_ERROR([qemu-img not found in $PATH:/usr/sbin:/sbin]) |
|
108 |
fi |
|
109 |
|
|
105 | 110 |
AC_PATH_PROG(INSTALL_MBR, [install-mbr], [], [$PATH:/usr/sbin:/sbin]) |
106 | 111 |
if test -z "$INSTALL_MBR" ; then |
107 | 112 |
AC_MSG_ERROR([install-mbr not found in $PATH:/usr/sbin:/sbin]) |
b/snf-image-host/create | ||
---|---|---|
95 | 95 |
result_file=$(mktemp --tmpdir result.XXXXXXXX) |
96 | 96 |
CLEANUP+=("rm -f $result_file") |
97 | 97 |
|
98 |
image_file=$(mktemp --tmpdir helperXXXXXXXX.img) |
|
99 |
CLEANUP+=("rm -f $image_file") |
|
100 |
|
|
101 |
$QEMU_IMG create -f qcow2 -b ${HELPER_IMG} $image_file |
|
102 |
|
|
98 | 103 |
$TIMELIMIT -t $HELPER_SOFT_TIMEOUT -T $HELPER_HARD_TIMEOUT \ |
99 |
kvm -runas $HELPER_USER -drive file=${HELPER_IMG},snapshot=on \
|
|
104 |
kvm -runas $HELPER_USER -drive file=${image_file} \
|
|
100 | 105 |
-drive file=$root_dev,format=raw,if=virtio,cache=none \ |
101 | 106 |
-boot c -serial stdio -serial file:$result_file -fda $floppy \ |
102 | 107 |
-vga none -nographic -parallel none -monitor null -nographic \ |
b/snf-image-host/defaults | ||
---|---|---|
49 | 49 |
# LOSETUP="losetup" |
50 | 50 |
# KPARTX="kpartx" |
51 | 51 |
# SFDISK="sfdisk" |
52 |
# QEMU_IMG="qemu-img" |
|
52 | 53 |
# INSTALL_MBR="install-mbr" |
53 | 54 |
# TIMELIMIT="timelimit" |
54 | 55 |
# if [ "$windows_support" = "yes" ] ; then |
Also available in: Unified diff