Added auto remote rdiff-backup installation if possible to ninjahelper
[matthijs/upstream/backupninja.git] / handlers / sys.helper
1 HELPERS="$HELPERS sys:general_hardware_and_system_info"
2
3 sys_wizard() {
4    require_packages hwinfo
5    checkBox "new sys action" "check options" \
6        "packages" "list of all installed packages." on \
7        "partitions" "the partition table of all disks." on  \
8        "hardware" "detailed hardware information" on
9    [ $? = 1 ] && return;    
10    result="$REPLY"
11    packages="packages = no"
12    partitions="partitions = no"
13    hardware="hardware = no"
14    for opt in $result; do
15       case $opt in
16         '"packages"') packages="packages = yes";;
17         '"partitions"') partitions="partitions = yes";;
18         '"hardware"') hardware="hardware = yes";;
19       esac
20    done
21    get_next_filename $configdirectory/10.sys
22    cat > $next_filename <<EOF
23 $packages
24 $partitions
25 $hardware
26 # packagesfile = /var/backups/dpkg-selections.txt
27 # partitionsfile = /var/backups/partitions.__star__.txt
28 # hardwarefile = /var/backups/hardware.txt
29 EOF
30    chmod 600 $next_filename
31 }
32