aboutsummaryrefslogtreecommitdiff
path: root/handlers
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2007-11-24 21:32:30 +0000
committerMicah Anderson <micah@riseup.net>2007-11-24 21:32:30 +0000
commit3f2a826652cb804c9abd14b3808f7a7a4648258a (patch)
treef6c91218baf4b2adb447317fa8b56e626bbf93e7 /handlers
parent19dbc0aaee22e66d40b83d01a0ad24b9b09cee92 (diff)
downloadbackupninja-3f2a826652cb804c9abd14b3808f7a7a4648258a.tar.gz
backupninja-3f2a826652cb804c9abd14b3808f7a7a4648258a.tar.bz2
fixed Trac #1, actually add example.rsync
Diffstat (limited to 'handlers')
-rwxr-xr-xhandlers/sys.in18
1 files changed, 12 insertions, 6 deletions
diff --git a/handlers/sys.in b/handlers/sys.in
index 2e181c8..b6c7fbc 100755
--- a/handlers/sys.in
+++ b/handlers/sys.in
@@ -32,35 +32,41 @@ else
warning "Unknown OS detected!"
fi
+getconf parentdir /var/backups
getconf packages yes
getconf dosfdisk yes
getconf dohwinfo yes
+
+if [ ! -d $parentdir ]; then
+ mkdir -p $parentdir
+fi
+
if [ $os = "debian" ]
then
- getconf packagesfile /var/backups/dpkg-selections.txt
+ getconf packagesfile $parentdir/dpkg-selections.txt
getconf packagemgr `which dpkg`
getconf packagemgroptions ' --get-selections *'
elif [ $os = "redhat" ]
then
- getconf packagesfile /var/backups/rpmpackages.txt
+ getconf packagesfile $parentdir/rpmpackages.txt
getconf packagemgr `which rpm`
getconf packagemgroptions ' -qa '
getconf SYSREPORT `which sysreport`
getconf sysreport_options ' -norpm '
else
- getconf packagesfile /var/backups/unknownOS.txt
+ getconf packagesfile $parentdir/unknownOS.txt
fi
packagemgroptions="${packagemgroptions//__star__/*}"
getconf partitions yes
-getconf partitionsfile /var/backups/partitions.__star__.txt
+getconf partitionsfile $parentdir/partitions.__star__.txt
getconf hardware yes
-getconf hardwarefile /var/backups/hardware.txt
+getconf hardwarefile $parentdir/hardware.txt
getconf sysreport yes
-getconf sysreportfile /var/backups/sysreport.txt
+getconf sysreportfile $parentdir/sysreport.txt
getconf SFDISK `which sfdisk`
getconf HWINFO `which hwinfo`