Commit d46fb573 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Fix helpers building System

parent 5d3735b5
Nikos Skalkotos <skalkoto@grnet.gr>
Constantinos Venetsanopoulos <cven@grnet.gr>
base_name=$(subst -helper,,$(PACKAGE))
SUBDIRS = tasks
initdir=$(sysconfdir)
commondir=$(datarootdir)/$(base_name)
dist_doc_DATA = COPYING AUTHORS ChangeLog
dist_init_SCRIPTS = rc.local snf-passtohash.py
dist_init_DATA = common.sh
edit = sed \
-e 's|@sysconfdir[@]|$(sysconfdir)|g' \
-e 's|@localstatedir[@]|$(localstatedir)|g' \
-e 's|@datarootdir[@]|$(datarootdir)|g' \
-e 's|@base_name[@]|$(base_name)|g'
-e 's|@RESIZE2FS[@]|$(RESIZE2FS)|g' \
-e 's|@XMLSTARLET[@]|$(XMLSTARLET)|g'
%:%.in Makefile
rm -f $@ $@.tmp
srcdir=''; \
test -f ./$@.in || srcdir=$(srcdir)/; \
$(edit) $${srcdir}$@.in >$@.tmp
mv $@.tmp $@
CLEANFILES = rc.local
#!/bin/sh
if test ! -f configure.ac ; then
echo "You must execute this script from the top level directory."
exit 1
fi
set -e
rm -rf config.cache autom4te.cache
mkdir -p autotools
${ACLOCAL:-aclocal} -I autotools
${AUTOCONF:-autoconf}
${AUTOMAKE:-automake} --add-missing
rm -rf autom4te.cache
AC_PREREQ(2.59)
AC_INIT(snf-image-helper, 0.1, synnefo@lists.grnet.gr)
AC_CONFIG_AUX_DIR(autotools)
AC_CONFIG_SRCDIR(configure)
AM_INIT_AUTOMAKE([1.9 foreign tar-ustar -Wall -Wno-portability])
AM_INIT_AUTOMAKE([subdir-objects])
# Check common programs
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_AWK
AC_PROG_MKDIR_P
AC_PATH_PROG(XMLSTARLET, [xmlstarlet], [], [$PATH:/usr/sbin:/sbin])
if test -z "$XMLSTARLET" ; then
AC_MSG_ERROR([xmlstarlet not found in $PATH])
fi
AC_PATH_PROG(RESIZE2FS, [resize2fs], [], [$PATH:/usr/sbin:/sbin])
if test -z "$RESIZE2FS" ; then
AC_MSG_ERROR([resize2fs not found in $PATH])
fi
AC_CONFIG_FILES([
Makefile
tasks/Makefile
])
AC_OUTPUT
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai :
......@@ -29,7 +29,7 @@
# those of the authors and should not be interpreted as representing official
# policies, either expressed or implied, of GRNET S.A.
. /usr/share/snf-image/common.sh
. @datarootdir@/@base_name@/common.sh
set -e
......
......@@ -7,7 +7,7 @@
### END TAST INFO
set -e
. /usr/share/snf-image/common.sh
. @datarootdir@/@base_name@/common.sh
if [ ! -b "$SNF_IMAGE_DEV" ]; then
log_error "Device file:\`${SNF_IMAGE_DEV}' is not a block device"
......
......@@ -7,7 +7,7 @@
### END TAST INFO
set -e
. /usr/share/snf-image/common.sh
. @datarootdir@/@base_name@/common.sh
if [ ! -d "$SNF_IMAGE_TARGET" ]; then
log_error "Target dir:\`$SNF_IMAGE_TARGET' is missing"
......
......@@ -8,7 +8,7 @@
### END TAST INFO
set -e
. /usr/share/snf-image/common.sh
. @datarootdir@/@base_name@/common.sh
if [ ! -d "$SNF_IMAGE_TARGET" ]; then
log_error "Target dir: \`$SNF_IMAGE_TARGET' is missing"
......
......@@ -7,7 +7,7 @@
### END TAST INFO
set -e
. /usr/share/snf-image/common.sh
. @datarootdir@/@base_name@/common.sh
if [ ! -d "$SNF_IMAGE_TARGET" ]; then
log_error "Target dir: \`$SNF_IMAGE_TARGET' is missing."
......
......@@ -8,7 +8,7 @@
### END TAST INFO
set -e
. /usr/share/snf-image/common.sh
. @datarootdir@/@base_name@/common.sh
if [ -z "$SNF_IMAGE_TARGET" ]; then
log_error "Target dir: \`$SNF_IMAGE_TARGET' is missing"
......
......@@ -8,7 +8,7 @@
### END TAST INFO
set -e
. /usr/share/snf-image/common.sh
. @datarootdir@/@base_name@/common.sh
if [ ! -d "$SNF_IMAGE_TARGET" ]; then
log_error "Target directory \`$SNF_IMAGE_TARGET' is missing"
......
......@@ -8,7 +8,7 @@
### END TAST INFO
set -e
. /usr/share/snf-image/common.sh
. @datarootdir@/@base_name@/common.sh
if [ ! -d "$SNF_IMAGE_TARGET" ]; then
log_error "Target dir: \`$SNF_IMAGE_TARGET' is missing"
......
......@@ -8,7 +8,7 @@
### END TAST INFO
set -e
. /usr/share/snf-image/common.sh
. @datarootdir@/@base_name@/common.sh
windows_hostname() {
local target=$1
......
......@@ -8,7 +8,7 @@
### END TAST INFO
set -e
. /usr/share/snf-image/common.sh
. @datarootdir@/@base_name@/common.sh
windows_password() {
local target=$1
......
......@@ -8,7 +8,7 @@
### END TAST INFO
set -e
. /usr/share/snf-image/common.sh
. @datarootdir@/@base_name@/common.sh
if [ ! -d "$SNF_IMAGE_TARGET" ]; then
log_error "Target dir:\`$SNF_IMAGE_TARGET' is missing"
......
base_name=$(subst -helper,,$(PACKAGE))
tasksdir=${libdir}/$(base_name)/tasks
dist_tasks_SCRIPTS = \
10ResizeUnmounted \
30MountImage \
40AddDeleteUnattendScript \
40DeleteSSHKeys \
40InstallUnattend \
40ResizeMounted \
40SELinuxAutorelabel \
50AssignHostname \
50ChangePassword \
80UmountImage
edit = sed \
-e 's|@sysconfdir[@]|$(sysconfdir)|g' \
-e 's|@localstatedir[@]|$(localstatedir)|g' \
-e 's|@datarootdir[@]|$(datarootdir)|g' \
-e 's|@base_name[@]|$(base_name)|g'
%:%.in Makefile
rm -f $@ $@.tmp
srcdir=''; \
test -f ./$@.in || srcdir=$(srcdir)/; \
$(edit) $${srcdir}$@.in >$@.tmp
mv $@.tmp $@
CLEANFILES = $(dist_tasks_SCRIPTS)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment