Commit b77bed4d authored by Leo Le Bouter's avatar Leo Le Bouter

dracut.module: Put env guards inside rule so install works without

parent d5c7d270
guard-%: dracut_module: 90metadata-collect/metadata-collect-agent 90metadata-collect/collect.sh
@ if [ "${${*}}" = "" ]; then \
include collect-sh-template.mk
90metadata-collect/collect.sh:
@ if [ "${ERP5_USER}" = "" ]; then \
echo "Environment variable $* not set"; \
exit 1; \
fi
@ if [ "${ERP5_PASS}" = "" ]; then \
echo "Environment variable $* not set"; \
exit 1; \
fi
@ if [ "${ERP5_BASE_URL}" = "" ]; then \
echo "Environment variable $* not set"; \ echo "Environment variable $* not set"; \
exit 1; \ exit 1; \
fi fi
include collect-sh-template.mk
90metadata-collect/collect.sh: guard-ERP5_USER guard-ERP5_PASS guard-ERP5_BASE_URL
echo "$${collect_sh}" >> 90metadata-collect/collect.sh echo "$${collect_sh}" >> 90metadata-collect/collect.sh
90metadata-collect/metadata-collect-agent: 90metadata-collect/metadata-collect-agent:
...@@ -16,7 +25,7 @@ clean: ...@@ -16,7 +25,7 @@ clean:
rm -fv 90metadata-collect/collect.sh 90metadata-collect/metadata-collect-agent rm -fv 90metadata-collect/collect.sh 90metadata-collect/metadata-collect-agent
.PHONY: install .PHONY: install
install: 90metadata-collect/metadata-collect-agent 90metadata-collect/collect.sh install: dracut_module
cp -vLr "90metadata-collect" /usr/lib/dracut/modules.d cp -vLr "90metadata-collect" /usr/lib/dracut/modules.d
.PHONY: uninstall .PHONY: uninstall
......
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