Skip to content

Commit

Permalink
[fix] Fix postinst/postrm in Makefile
Browse files Browse the repository at this point in the history
The postinst/postrm directives must use IPKG_INSTROOT because they are
executed by the image builder as well.
  • Loading branch information
okraits authored Jul 4, 2024
1 parent b93020d commit 0c57d38
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions openwisp-config/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,19 @@ endef
# for backward compatibility
define Package/openwisp-config/postinst
#!/bin/sh
if [ ! -L /usr/sbin/openwisp_config ]; then
ln -s /usr/sbin/openwisp-config /usr/sbin/openwisp_config
if [ ! -L $${IPKG_INSTROOT}/usr/sbin/openwisp_config ]; then
ln -s /usr/sbin/openwisp-config $${IPKG_INSTROOT}/usr/sbin/openwisp_config
fi

if [ ! -L /etc/init.d/openwisp_config ]; then
ln -s /etc/init.d/openwisp-config /etc/init.d/openwisp_config
if [ ! -L $${IPKG_INSTROOT}/etc/init.d/openwisp_config ]; then
ln -s /etc/init.d/openwisp-config $${IPKG_INSTROOT}/etc/init.d/openwisp_config
fi
endef

define Package/openwisp-config/postrm
#!/bin/sh
rm -f /usr/sbin/openwisp_config
rm -f /etc/init.d/openwisp_config
rm -f $${IPKG_INSTROOT}/usr/sbin/openwisp_config
rm -f $${IPKG_INSTROOT}/etc/init.d/openwisp_config
endef

$(eval $(call BuildPackage,openwisp-config))

0 comments on commit 0c57d38

Please sign in to comment.