From 9a39424c97152e457f5fbe61e1d16d8377156ed4 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Tue, 10 Sep 2024 19:42:32 +0200 Subject: [PATCH] Fix reinstall packages after update --- luci-app-sysupgrade/root/etc/init.d/sysupgrade | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/luci-app-sysupgrade/root/etc/init.d/sysupgrade b/luci-app-sysupgrade/root/etc/init.d/sysupgrade index 9ffc3c537..44aac9fa8 100755 --- a/luci-app-sysupgrade/root/etc/init.d/sysupgrade +++ b/luci-app-sysupgrade/root/etc/init.d/sysupgrade @@ -1,5 +1,5 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2020-2021 Ycarus (Yannick Chabanois) +# Copyright (C) 2020-2024 Ycarus (Yannick Chabanois) # Released under GPL 3. See LICENSE for the full terms. { @@ -11,8 +11,8 @@ start_service() { if [ -f /etc/backup/installed_packages.txt ]; then - if [ "$(opkg -V0 update 2>&1)" = "" ]; then - grep "\toverlay" /etc/backup/installed_packages.txt | cut -f1 | xargs -r opkg -V0 install + opkg -V0 update >/dev/null 2>&1 + if [ -z "$(grep '\toverlay' /etc/backup/installed_packages.txt | cut -f1 | xargs -r opkg -V0 install)" ]; then rm /etc/backup/installed_packages.txt fi fi