1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Fix reinstall packages after update

This commit is contained in:
Ycarus (Yannick Chabanois) 2024-09-10 19:42:32 +02:00
parent d5cd3b6d16
commit 9a39424c97

View file

@ -1,5 +1,5 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2020-2021 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
# Copyright (C) 2020-2024 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
# 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