mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Adapt sysupgrade init script to apk
This commit is contained in:
parent
19aa4ac132
commit
ab3cbb9a48
1 changed files with 11 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2020-2024 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
|
# Copyright (C) 2020-2025 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
|
||||||
# Released under GPL 3. See LICENSE for the full terms.
|
# Released under GPL 3. See LICENSE for the full terms.
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -11,10 +11,16 @@
|
||||||
start_service()
|
start_service()
|
||||||
{
|
{
|
||||||
if [ -f /etc/backup/installed_packages.txt ]; then
|
if [ -f /etc/backup/installed_packages.txt ]; then
|
||||||
opkg -V0 update >/dev/null 2>&1
|
if [ -e /usr/bin/apk ]; then
|
||||||
if [ -z "$(grep '\toverlay' /etc/backup/installed_packages.txt | cut -f1 | xargs -r opkg -V0 install)" ]; then
|
apk update >/dev/null 2>&1
|
||||||
rm /etc/backup/installed_packages.txt
|
if [ -z "$(grep '\toverlay' /etc/backup/installed_packages.txt | cut -f1 | xargs -r apk add)" ]; then
|
||||||
fi
|
rm /etc/backup/installed_packages.txt
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue