mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-01-21 12:21:38 +01:00
Due to the way apk lifecycle scripts are defined, they might end up with
multiple shebangs. Remove them.
Before:
post-upgrade: |
#!/bin/sh
export PKG_UPGRADE=1
#!/bin/sh
[ "${IPKG_NO_SCRIPT}" = "1" ] && exit 0
[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0
. ${IPKG_INSTROOT}/lib/functions.sh
export root="${IPKG_INSTROOT}"
export pkgname="adblock-fast"
add_group_and_user
default_postinst
#!/bin/sh
# check if we are on real system
if [ -z "${IPKG_INSTROOT}" ]; then
/etc/init.d/adblock-fast enable
fi
exit 0
After:
post-upgrade: |
#!/bin/sh
export PKG_UPGRADE=1
[ "${IPKG_NO_SCRIPT}" = "1" ] && exit 0
[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0
. ${IPKG_INSTROOT}/lib/functions.sh
export root="${IPKG_INSTROOT}"
export pkgname="adblock-fast"
add_group_and_user
default_postinst
# check if we are on real system
if [ -z "${IPKG_INSTROOT}" ]; then
/etc/init.d/adblock-fast enable
fi
exit 0
Fixes: b52e897 ("include/package-pack: remove leading whitespace from install scripts")
Fixes: 03880e2 ("include/package-pack: add missing apk package lifecycle events")
Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/21369
Signed-off-by: Robert Marko <robimarko@gmail.com>