diff --git a/lib/makeboarddeb.sh b/lib/makeboarddeb.sh index 78934f1a2d..78efd1e1d4 100644 --- a/lib/makeboarddeb.sh +++ b/lib/makeboarddeb.sh @@ -63,9 +63,11 @@ create_board_package() # postrm script cat <<-EOF > $destination/DEBIAN/postrm #!/bin/sh - [ remove = "\$1" ] || [ abort-install = "\$1" ] && dpkg-divert --package linux-${RELEASE}-root-${DEB_BRANCH}${BOARD} --remove --rename \ - --divert /etc/mpv/mpv-dist.conf /etc/mpv/mpv.conf - systemctl disable log2ram.service armhwinfo.service >/dev/null 2>&1 + if [ remove = "\$1" ] || [ abort-install = "\$1" ]; then + dpkg-divert --package linux-${RELEASE}-root-${DEB_BRANCH}${BOARD} --remove --rename \ + --divert /etc/mpv/mpv-dist.conf /etc/mpv/mpv.conf + systemctl disable log2ram.service armhwinfo.service >/dev/null 2>&1 + fi exit 0 EOF