mirror of
https://github.com/limosek/zaf.git
synced 2024-11-21 09:59:07 +01:00
Repaired postinst and dpkg check
This commit is contained in:
parent
a320c33d44
commit
da87113b47
5
Makefile
5
Makefile
@ -53,7 +53,10 @@ deb-control:
|
||||
deb-scripts:
|
||||
@. lib/zaf.lib.sh; \
|
||||
. lib/ctrl.lib.sh; \
|
||||
cat files/postinst.template | zaf_far '{PLUGINS}' "$(PLUGINS)" | zaf_far "{IPLUGINS}" "$(IPLUGINS)" | zaf_far '{ZAF_LIB_DIR}' "/usr/lib/zaf" >$(DEBIAN_CTRL)/postinst
|
||||
cat files/postinst.template | \
|
||||
zaf_far '{PLUGINS}' "$$(for p in $(PLUGINS); do echo $$(basename $$p); done)" | \
|
||||
zaf_far '{IPLUGINS}' "$$(for p in $(IPLUGINS); do echo $$(basename $$p); done)" | \
|
||||
zaf_far '{ZAF_LIB_DIR}' "/usr/lib/zaf" >$(DEBIAN_CTRL)/postinst
|
||||
@chmod +x $(DEBIAN_CTRL)/postinst
|
||||
@cp files/preinst.template $(DEBIAN_CTRL)/preinst
|
||||
@chmod +x $(DEBIAN_CTRL)/preinst
|
||||
|
@ -8,7 +8,12 @@ configure)
|
||||
. /usr/lib/zaf/os.lib.sh
|
||||
. /usr/lib/zaf/ctrl.lib.sh
|
||||
cd /usr/lib/zaf && /usr/lib/zaf/install.sh reconf
|
||||
[ -n "{PLUGINS}" ] && zaf reinstall {PLUGINS} {IPLUGINS}
|
||||
[ -n "{PLUGINS}" ] && for p in {PLUGINS}; do
|
||||
if ! is_plugin $p;then
|
||||
zaf install $ZAF_PREPACKAGED_DIR/$p;
|
||||
fi
|
||||
done
|
||||
[ -n "{IPLUGINS}" ] && zaf reinstall {IPLUGINS}
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
@ -130,7 +130,7 @@ zaf_install_agent_opkg() {
|
||||
# $* - packages
|
||||
zaf_check_deps_dpkg() {
|
||||
for i in $*; do
|
||||
dpkg-query -f '${Status},${Package}\n' -W $* 2>/dev/null | grep -q "^install ok"
|
||||
dpkg-query -f '${Status},${Package}\n' -W $* 2>/dev/null | grep -q "^install ok installed"
|
||||
done
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user