aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/rootfs.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/rootfs.mk b/include/rootfs.mk
index 15f71ae0df..b1617215a3 100644
--- a/include/rootfs.mk
+++ b/include/rootfs.mk
@@ -60,6 +60,11 @@ define prepare_rootfs
cd $(1); \
for script in ./usr/lib/opkg/info/*.postinst; do \
IPKG_INSTROOT=$(1) $$(which bash) $$script; \
+ ret=$$?; \
+ if [ $$ret -ne 0 ]; then \
+ echo "postinst script $$script has failed with exit code $$ret" >&2; \
+ exit 1; \
+ fi; \
done; \
for script in ./etc/init.d/*; do \
grep '#!/bin/sh /etc/rc.common' $$script >/dev/null || continue; \