Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions changelog.d/715-postinst-nds-husk.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
- **The package postinst now fails loudly when nodogsplash was
orphan-removed.** An aborted opkg transaction can orphan-remove runtime
dependencies and leave zero-byte husks — the nodogsplash binary and init
script, plus libmicrohttpd, curl, socat, jq — while the old postinst's
`restart 2>/dev/null || true` reported success over the dead captive
portal, hiding the damage until every downstream symptom looked like a
product bug. The postinst now refuses to claim success when the
nodogsplash binary or init script is empty and points at the
remediation (`opkg update`, then reinstall nodogsplash and this
package)
([#715](https://github.com/OpenTollGate/tollgate-module-basic-go/pull/715)).
- The same guard now ships in the feed recipe (FreedomTechFeed/packages), the lane routers actually install.
12 changes: 12 additions & 0 deletions packaging/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,18 @@ wifi reload 2>/dev/null || true
/etc/init.d/firewall reload 2>/dev/null || true
/etc/init.d/dnsmasq restart 2>/dev/null || true
/etc/init.d/uhttpd restart 2>/dev/null || true
# Fail loud when the captive portal cannot serve: an aborted opkg
# transaction can orphan-remove runtime deps and leave zero-byte husks
# (nodogsplash binary/init — issue #109, the #93 class). Installing
# "successfully" with a dead portal hides the damage until every
# downstream test fails opaquely.
if [ ! -s /usr/bin/nodogsplash ] || [ ! -s /etc/init.d/nodogsplash ]; then
echo "ERROR: nodogsplash binary or init script is empty (zero bytes) —" >&2
echo "the install transaction likely aborted and orphan-removed runtime" >&2
echo "deps. Run 'opkg update' and reinstall nodogsplash, then reinstall" >&2
echo "this package. Refusing to claim success with a dead portal." >&2
exit 1
fi
/etc/init.d/nodogsplash restart 2>/dev/null || true

if [ -x /etc/init.d/tollgate-wrt ]; then
Expand Down
12 changes: 12 additions & 0 deletions packaging/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,18 @@ wifi reload 2>/dev/null || true
/etc/init.d/firewall reload 2>/dev/null || true
/etc/init.d/dnsmasq restart 2>/dev/null || true
/etc/init.d/uhttpd restart 2>/dev/null || true
# Fail loud when the captive portal cannot serve: an aborted opkg
# transaction can orphan-remove runtime deps and leave zero-byte husks
# (nodogsplash binary/init — issue #109, the #93 class). Installing
# "successfully" with a dead portal hides the damage until every
# downstream test fails opaquely.
if [ ! -s /usr/bin/nodogsplash ] || [ ! -s /etc/init.d/nodogsplash ]; then
echo "ERROR: nodogsplash binary or init script is empty (zero bytes) —" >&2
echo "the install transaction likely aborted and orphan-removed runtime" >&2
echo "deps. Run 'opkg update' and reinstall nodogsplash, then reinstall" >&2
echo "this package. Refusing to claim success with a dead portal." >&2
exit 1
fi
/etc/init.d/nodogsplash restart 2>/dev/null || true

if [ -x /etc/init.d/tollgate-wrt ]; then
Expand Down