From: Elijah Saxon Date: Mon, 14 Mar 2005 21:49:29 +0000 (+0000) Subject: fixed bug with __star__ and sys handler. X-Git-Tag: backupninja-0.4.4~4 X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fbackupninja.git;a=commitdiff_plain;h=907f7d4455c722670e2f787b6f3f77877891862b fixed bug with __star__ and sys handler. well, not really, but i worked around a bug that i don't understand. --- diff --git a/backupninja b/backupninja index ce85ba4..3cd3cae 100755 --- a/backupninja +++ b/backupninja @@ -143,7 +143,6 @@ function getconf() { # replace * with %, so that it is not globbed. ret="${ret//\\*/__star__}" - ret="${ret//\*/__star__}" # this is weird, but single quotes are needed to # allow for returned values with spaces. $ret is still expanded diff --git a/changelog b/changelog index ed2435f..ae13449 100644 --- a/changelog +++ b/changelog @@ -1,10 +1,13 @@ -version 0.4.3 -- Jan 20 2005 +version 0.4.3 -- ???? results of handlers are now read line by line. - changes to rdiff handler: added "options", and "keep" is not necessarily days now. + changes to rdiff handler: added "options", and "keep" is + not necessarily days now (ie, it will pass straight through to + rdiff-backup if the keep has a unit on it, otherwise it adds the 'D'). added dup handler (still pretty beta) added maildir handler (very specialized handler) added --run option (runs the specified action file) improved sys handler, now uses hwinfo + added PATH to cron.d file, which fixes file not found errors. version 0.4.2 -- Jan 6 2005 fixed bug which caused a report email to be sent even if no actions were run. diff --git a/etc/backup.d/example.sys b/etc/backup.d/example.sys index 4fb231d..9ebd4b2 100644 --- a/etc/backup.d/example.sys +++ b/etc/backup.d/example.sys @@ -2,6 +2,8 @@ # this config file will save various reports of vital system information. # by default, all the reports are enabled and are saved in /var/backups. # +# requires dpkg, sfdisk, and hwinfo +# # (1) a list of all the packages installed and removed. # this file can be used to restore the state of installed packages # by running "dpkg --set-selections < dpkg-selections.txt @@ -14,8 +16,7 @@ # (MAKE SURE YOU PARTITION THE CORRECT DISK!!!) # # (3) hardware information. -# a simple report is generated of the kernel modules, the devices, -# and the model of the hardware which 'discover' is able to detect. +# detailed information on most important aspects of the hardware. # # here are the defaults, commented out: @@ -24,7 +25,7 @@ # packagesfile = /var/backups/dpkg-selections.txt # partitions = yes -# partitionsfile = /var/backups/partitions.*.txt +# partitionsfile = /var/backups/partitions.__star__.txt # hardware = yes # hardwarefile = /var/backups/hardware.txt diff --git a/handlers/sys b/handlers/sys index be8f3fc..fe780b5 100755 --- a/handlers/sys +++ b/handlers/sys @@ -14,14 +14,14 @@ # (MAKE SURE YOU PARTITION THE CORRECT DISK!!!) # # (3) hardware information. -# write to a text file the important things which hwinfo can discover. +# write to a text file the important things which hwinfo can gleen. # getconf packages yes getconf packagesfile /var/backups/dpkg-selections.txt getconf partitions yes -getconf partitionsfile '/var/backups/partitions.*.txt' +getconf partitionsfile /var/backups/partitions.__star__.txt getconf hardware yes getconf hardwarefile /var/backups/hardware.txt @@ -91,6 +91,7 @@ if [ "$hardware" == "yes" ]; then fi touch $hardwarefile echo -e "\n\n====================== summary ======================\n" >> $hardwarefile + debug "hwinfo --short --cpu --network --disk --pci >> $hardwarefile" hwinfo --short --cpu --network --disk --pci >> $hardwarefile for flag in cpu network disk bios pci; do echo -e "\n\n====================== $flag ======================\n" >> $hardwarefile