mysql: No longer prepend vroot to the backupdir.
[matthijs/upstream/backupninja-vserver.git] / handlers / sys.helper.in
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 debconf-utils
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        "sfdisk" "use sfdisk to get partition information." on \
11        "hardware" "detailed hardware information" on
12    [ $? = 1 ] && return;    
13    result="$REPLY"
14    packages="packages = no"
15    partitions="partitions = no"
16    sfdisk="dosfdisk = no"
17    hardware="hardware = no"
18    for opt in $result; do
19       case $opt in
20         '"packages"') packages="packages = yes";;
21         '"partitions"') partitions="partitions = yes";;
22         '"sfdisk"') sfdisk="dosfdisk = yes";;
23         '"hardware"') hardware="hardware = yes";;
24       esac
25    done
26    get_next_filename $configdirectory/10.sys
27    cat > $next_filename <<EOF
28 $packages
29 $partitions
30 $sfdisk
31 $hardware
32 # packagesfile = /var/backups/dpkg-selections.txt
33 # selectionsfile = /var/backups/debconfsel.txt
34 # partitionsfile = /var/backups/partitions.__star__.txt
35 # hardwarefile = /var/backups/hardware.txt
36
37 # If vservers = yes in /etc/backupninja.conf then the following variables can
38 # be used:
39 # vsnames = all | <vserver1> <vserver2> ... (default = all)
40 EOF
41    chmod 600 $next_filename
42 }
43