Revision 47c86659
b/Makefile.am | ||
---|---|---|
1 | 1 |
osdir=$(OS_DIR)/$(OS_NAME) |
2 | 2 |
linuxcustomdir=${sysconfdir}/ganeti/instance-image/hooks/linux |
3 |
|
|
4 |
if WINSUPPORT |
|
3 | 5 |
windowscustomdir=${sysconfdir}/ganeti/instance-image/hooks/windows |
6 |
endif |
|
7 |
|
|
4 | 8 |
configdir=${sysconfdir}/ganeti/instance-image |
5 | 9 |
variantsdir=${sysconfdir}/ganeti/instance-image/variants |
6 | 10 |
networksdir=${sysconfdir}/ganeti/instance-image/networks |
... | ... | |
9 | 13 |
|
10 | 14 |
dist_os_SCRIPTS = create import export rename verify |
11 | 15 |
dist_tools_SCRIPTS = tools/* |
12 |
dist_os_DATA = ganeti_api_version parameters.list common_linux.sh common_windows.sh |
|
16 |
dist_os_DATA = ganeti_api_version parameters.list common_linux.sh |
|
17 |
if WINSUPPORT |
|
18 |
dist_os_DATA += common_windows.sh |
|
19 |
endif |
|
13 | 20 |
dist_config_DATA = variants.list |
14 | 21 |
os_DATA = common.sh |
15 | 22 |
|
16 | 23 |
dist_linuxcustom_DATA = example/hooks/linux/* |
24 |
if WINSUPPORT |
|
17 | 25 |
dist_windowscustom_DATA = example/hooks/windows/* |
18 |
|
|
26 |
endif |
|
19 | 27 |
dist_doc_DATA = COPYING NEWS README |
20 | 28 |
|
21 | 29 |
EXTRA_DIST = common.sh.in defaults |
b/common.sh.in | ||
---|---|---|
24 | 24 |
SFDISK="@SFDISK@" |
25 | 25 |
QEMU_IMG="@QEMU_IMG@" |
26 | 26 |
MKDIR_P="@MKDIR_P@" |
27 |
XMLSTARLET="@XMLSTARLET@" |
|
28 |
|
|
29 |
@WINSUPPORT_TRUE@windows_support="yes" |
|
27 | 30 |
|
28 | 31 |
CLEANUP=( ) |
29 | 32 |
|
b/common_windows.sh | ||
---|---|---|
1 | 1 |
|
2 |
if [ -z "$windows_support" ] ; then |
|
3 |
log_error "Windows support is disabled." |
|
4 |
exit 1; |
|
5 |
fi |
|
6 |
|
|
2 | 7 |
windows_format_disk0() { |
3 | 8 |
# |
4 | 9 |
# The -f is needed, because we use an optimal alignment and sfdisk complains |
b/configure.ac | ||
---|---|---|
6 | 6 |
|
7 | 7 |
AM_INIT_AUTOMAKE([1.9 foreign tar-ustar -Wall -Wno-portability]) |
8 | 8 |
|
9 |
#Handle --disable-windows-support |
|
10 |
AC_ARG_ENABLE(windows_support, |
|
11 |
AS_HELP_STRING([--disable-windows-support], |
|
12 |
[disable Windows support]), |
|
13 |
, enable_windows_support=yes) |
|
14 |
AM_CONDITIONAL(WINSUPPORT, [test "x$enable_windows_support" = "xyes"]) |
|
15 |
|
|
9 | 16 |
# --with-os-dir=... |
10 | 17 |
AC_ARG_WITH([os-dir], |
11 | 18 |
[AS_HELP_STRING([--with-os-dir=DIR], |
... | ... | |
67 | 74 |
AC_MSG_ERROR([qemu-img not found in $PATH]) |
68 | 75 |
fi |
69 | 76 |
|
77 |
if test "x$enable_windows_support" = "xyes" |
|
78 |
then |
|
79 |
AC_PATH_PROG(XMLSTARLET, [xmlstarlet], [], [$PATH:/usr/sbin:/sbin]) |
|
80 |
if test -z "$XMLSTARLET" ; then |
|
81 |
AC_MSG_ERROR([xmlstarlet is needed for Windows but not found in $PATH] |
|
82 |
[To disable windows support run with --disable-windows-support]) |
|
83 |
fi |
|
84 |
fi |
|
85 |
|
|
70 | 86 |
AC_CONFIG_FILES([ |
71 | 87 |
Makefile |
72 | 88 |
common.sh |
Also available in: Unified diff