created ninjahelper
[matthijs/upstream/backupninja.git] / handlers / sys.helper
1
2 sys_wizard() {
3    require_packages hwinfo
4    checkBox "new sys action" "check options" \
5        "packages" "list of all installed packages." on \
6        "partitions" "the partition table of all disks." on  \
7        "hardware" "detailed hardware information" on
8    [ $? = 1 ] && return;    
9    result="$REPLY"
10    packages="packages = off"
11    partitions="partitions = off"
12    hardware="hardware = off"
13    for opt in $result; do
14       case $opt in
15         '"packages"') packages="packages = on";;
16         '"partitions"') partitions="partitions = on";;
17         '"hardware"') hardware="hardware = on";;
18       esac
19    done
20    get_next_filename $configdirectory/10.sys
21    cat > $next_filename <<EOF
22 $packages
23 $partitions
24 $hardware
25 # databases   = all
26 # backupdir   = /var/backups/mysql
27 # dbhost      = localhost
28 EOF
29    chmod 000 $next_filename
30 }
31