From 7aaf65e8bd0f8965b259c0ff69a709324566b5fc Mon Sep 17 00:00:00 2001 From: Tobias Mueller Date: Mon, 28 Aug 2023 09:55:41 +0200 Subject: [PATCH] support a clean uninstall of blue-merle Before this change, uninstalling the package would complain about /tmp/sim_change_start not existing: root@GL-E750:/tmp# opkg remove blue-merle Removing package blue-merle from root... The /tmp/ directory exists. The /etc/ directory exists. killall: gltertf: no process killed No file found within /tmp/tertf. No shredding to be done there. No file found within /etc/tertf. No shredding to be done there. Looks like /tmp/ is clean! Looks like /etc/ is clean! rm: can't remove '/tmp/sim_change_start': No such file or directory rm: can't remove '/tmp/sim_change_switch': No such file or directory No packages removed. Collected errors: * pkg_run_script: package "blue-merle" postrm script returned status 1. root@GL-E750:/tmp# So we use -f to not raise an error if the file does not exist. --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6769229..a1be19a 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=blue-merle -PKG_VERSION:=1.0.1 +PKG_VERSION:=1.0.2 PKG_RELEASE:=$(AUTORELEASE) PKG_MAINTAINER:=Matthias @@ -144,8 +144,8 @@ define Package/blue-merle/postrm mv /usr/bin/switchaction.orig /usr/bin/switchaction mv /usr/bin/switch_queue.orig /usr/bin/switch_queue - rm /tmp/sim_change_start - rm /tmp/sim_change_switch + rm -f /tmp/sim_change_start + rm -f /tmp/sim_change_switch endef $(eval $(call BuildPackage,$(PKG_NAME)))