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