mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
core100: add function to set last correct installed core on update.
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
@@ -24,8 +24,17 @@
|
|||||||
. /opt/pakfire/lib/functions.sh
|
. /opt/pakfire/lib/functions.sh
|
||||||
/usr/local/bin/backupctrl exclude >/dev/null 2>&1
|
/usr/local/bin/backupctrl exclude >/dev/null 2>&1
|
||||||
|
|
||||||
# Remove old core updates from pakfire cache to save space...
|
|
||||||
core=100
|
core=100
|
||||||
|
|
||||||
|
function exit_with_error() {
|
||||||
|
# Set last succesfull installed core.
|
||||||
|
echo $(($core-1)) > /opt/pakfire/db/core/mine
|
||||||
|
/usr/bin/logger -p syslog.emerg -t ipfire \
|
||||||
|
"core-update-${core}: $1"
|
||||||
|
exit $2
|
||||||
|
}
|
||||||
|
|
||||||
|
# Remove old core updates from pakfire cache to save space...
|
||||||
for (( i=1; i<=$core; i++ ))
|
for (( i=1; i<=$core; i++ ))
|
||||||
do
|
do
|
||||||
rm -f /var/cache/pakfire/core-upgrade-*-$i.ipfire
|
rm -f /var/cache/pakfire/core-upgrade-*-$i.ipfire
|
||||||
|
|||||||
Reference in New Issue
Block a user