Skip to content
Snippets Groups Projects
Select Git revision
  • 95506463d42027049341dc31b8174b33952e3dbd
  • v3.3 default protected
  • experimental protected
  • nrb/airmax-test
  • nrb/ro-flash-nanostation-airmax
  • nrb/add-node-whisperer
  • v3.2 protected
  • v3.1 protected
  • nrb-domains
  • v3.0 protected
  • nrb/dns-cache
  • v2.9 protected
  • feature/addMikrotikwAP
  • v2.8 protected
  • v2.5.1 protected
  • v2.7 protected
  • v2.6 protected
  • v2.5 protected
  • v2.4 protected
  • cpe510
  • nrb/gluon-master-cpe510
  • v3.2.1+2024-12-15
  • v3.2+2024-12-04
  • v3.1+2024-07-08
  • v2.9+2023-05-13
  • v2.9+2023-05-12
  • v2.9+2023-05-10
  • v2.8+2023-03-05
  • v2.7+2022-12-03
  • v2.6+2022-09-06
  • v2.5+2022-05-07
  • v2.5+2022-05-05
  • v2.4+2022-02-26
  • v2.3+2021-06-03
  • v2.3+2021-04-30
  • v2.2+2021-04-16
  • v2.2+2020-04-16
  • v2.1+2020-12-11
  • v2.1+2020-11-17
  • v2.0+2020-09-26
  • v2.0+2020-06-28
41 results

modules

Blame
  • 0019-base-files-default_postinst-propagate-the-real-postinst-return-code.patch 1.51 KiB
    From: Matthias Schiffer <mschiffer@universe-factory.net>
    Date: Fri, 7 Aug 2015 18:45:42 +0200
    Subject: base-files: default_postinst: propagate the real postinst return code
    
    Using the postinst script for sanity checks and expecting opkg to fail
    if the postinst didn't return 0 was possible in Barrier Breaker, propagate
    the real postinst return code through default_postinst to restore this
    behaviour.
    
    diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
    index 8d045fa..2f78d67 100755
    --- a/package/base-files/files/lib/functions.sh
    +++ b/package/base-files/files/lib/functions.sh
    @@ -174,7 +174,8 @@ default_prerm() {
     }
     
     default_postinst() {
    -	local pkgname rusers
    +	local pkgname rusers ret
    +	ret=0
     	pkgname=$(basename ${1%.*})
     	rusers=$(grep "Require-User:" ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.control)
     	[ -n "$rusers" ] && {
    @@ -215,7 +216,10 @@ default_postinst() {
     		done
     	}
     
    -	[ -f ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg ] && ( . ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg )
    +	if [ -f ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg ]; then
    +		( . ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg )
    +		ret=$?
    +	fi
     	[ -n "${IPKG_INSTROOT}" ] || rm -f /tmp/luci-indexcache 2>/dev/null
     
     	[ "$PKG_UPGRADE" = "1" ] || for i in `cat ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.list | grep "^/etc/init.d/"`; do
    @@ -225,7 +229,7 @@ default_postinst() {
     			$i start
     		}
     	done
    -	return 0
    +	return $ret
     }
     
     include() {