sysmocom-backup: Allow to back-up more files than the initial config

Creating a new file in /etc/sysmocom/backup.d/ that ends with .backup
will be read during the backup and then be restored. This way we can
easily extend the files to backup.
This commit is contained in:
Holger Hans Peter Freyther 2014-09-24 15:52:02 +02:00
parent ddc43d20a7
commit 2045245f3a
2 changed files with 12 additions and 1 deletions

View File

@ -23,7 +23,18 @@ FILES="\
var/lib/osmocom/hlr.sqlite3 \
etc/lcr \
etc/udhcpd.conf \
etc/sysmocom/backup.d \
"
# Pick some extra files
if [ -e /etc/sysmocom/backup.d/ ]; then
for extra in `ls /etc/sysmocom/backup.d/*.backup`;
do
echo "Add extras from $extra."
FILES="$FILES `cat $extra`"
done
fi
DATE=`date +%Y%m%d`

View File

@ -1,7 +1,7 @@
DESCRIPTION = "sysmocom config backup and restore scripts"
LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
PR = "r11"
PR = "r12"
SRC_URI = "file://sysmocom-backup file://sysmocom-restore"
RDEPENDS_${PN} = "tar"