diff options
-rwxr-xr-x | applications/luci-app-statistics/root/etc/init.d/luci_statistics | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/applications/luci-app-statistics/root/etc/init.d/luci_statistics b/applications/luci-app-statistics/root/etc/init.d/luci_statistics index d36534cce4..20acf70019 100755 --- a/applications/luci-app-statistics/root/etc/init.d/luci_statistics +++ b/applications/luci-app-statistics/root/etc/init.d/luci_statistics @@ -13,9 +13,7 @@ SYSUPGRADE_BACKUP_TWIN_A="${BACKUP_DIR}/sysupgrade.trustme.txt" SYSUPGRADE_BACKUP_TWIN_B="${BACKUP_DIR}/sysupgrade.dont.trustme.txt" EXTRA_COMMANDS="backup sysupgrade_backup" EXTRA_HELP="\ - backup Backup current rrd database if configured to do so\n\ - sysupgrade_backup Take a special backup for sysupgrade/configuration saving" - + backup Backup current rrd database if configured to do so" TRACE=0 doing_backups() { @@ -150,6 +148,10 @@ copy_backup_for_sysupgrade() { sysupgrade_backup() { local filelist="$1" + [ -z "$filelist" -o ! -f "$filelist" ] && { + echo sysupgrade_backup requires an existing filename argument 1>&2 + exit 1 + } [ ${TRACE} -gt 0 ] && logger -t ${0##*/} -- luci_statistics sysupgrade_backup CONF_BACKUP_LIST=${CONF_BACKUP_LIST} doing_backups && { ### CONF_BACKUP_LIST=1 means we are generating the |