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

Fix helper's Makefile

 * Change the main script from rc.local to snf-image-helper.
 * Fix some build dirs.
parent 9279d315
SUBDIRS = tasks
base_name=$(subst -helper,,$(PACKAGE))
initdir=$(sysconfdir)
commondir=$(datarootdir)/$(base_name)
export base_name
commondir=$(datarootdir)/$(PACKAGE)
scriptsdir=$(libdir)/$(PACKAGE)
tasksdir=$(scriptsdir)/tasks
export commondir
export scriptsdir
export tasksdir
SUBDIRS = tasks
dist_doc_DATA = COPYING AUTHORS ChangeLog
dist_init_SCRIPTS = rc.local
dist_common_SCRIPTS= snf-passtohash.py
dist_bin_SCRIPTS = snf-image-helper
dist_scripts_SCRIPTS= snf-passtohash.py
dist_common_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|@commondir[@]|$(commondir)|g' \
-e 's|@RESIZE2FS[@]|$(RESIZE2FS)|g' \
-e 's|@XMLSTARLET[@]|$(XMLSTARLET)|g'
%:%.in Makefile
@echo "Real Path is: $(rootdir)"
rm -f $@ $@.tmp
srcdir=''; \
test -f ./$@.in || srcdir=$(srcdir)/; \
$(edit) $${srcdir}$@.in >$@.tmp
mv $@.tmp $@
CLEANFILES = rc.local
CLEANFILES = snf-image-helper
......@@ -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.
. @datarootdir@/@base_name@/common.sh
. @commondir@/common.sh
set -e
......@@ -53,7 +53,7 @@ else
fi
# Image mount point...
target=$(mktemp -d --tmpdir target.XXXXXXXX) || exit 1
target=$(mktemp -d --tmpdir target.XXXXXXXX)
CLEANUP+=("rmdir $target")
export SNF_IMAGE_TARGET=$target
......@@ -68,7 +68,7 @@ if [ -z "$RUN_PARTS" ]; then
fi
echo "Execute all snf-image tasks...."
$RUN_PARTS -v --exit-on-error "/usr/lib/snf-image/tasks"
$RUN_PARTS -v --exit-on-error "@tasksdir@"
echo "SUCCESS" > $RESULT
......
tasksdir=${libdir}/$(base_name)/tasks
tasksdir=$(libdir)/$(PACKAGE)/tasks
dist_tasks_SCRIPTS = \
10ResizeUnmounted \
......@@ -12,7 +12,6 @@ dist_tasks_SCRIPTS = \
50ChangePassword \
80UmountImage
edit = sed \
-e 's|@sysconfdir[@]|$(sysconfdir)|g' \
-e 's|@localstatedir[@]|$(localstatedir)|g' \
......
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