#!/bin/bash -e

# debirf module: rescue
# remove/install extra packages for disk rescue with apt-get
#
# The debirf scripts were written by
# Jameson Rollins <jrollins@fifthhorseman.net>
# and
# Daniel Kahn Gillmor <dkg-debian.org@fifthhorseman.net>.
#
# They are Copyright 2007, and are all released under the GPL,
# version 3 or later.

# preseed.  helpful link:
# http://blog.hjksolutions.com/articles/category/solutions
debirf_exec debconf-set-selections <<EOF
# Do you want to start MD arrays automatically?
mdadm mdadm/autostart boolean false
# MD arrays needed for the root filesystem:
mdadm mdadm/initrdstart string none
# Proceed with starting arrays not listed in mdadm.conf?
mdadm mdadm/initrdstart_notinconf boolean false
# Do you want to start the MD monitoring daemon?
mdadm mdadm/start_daemon boolean false
# Recipient for email notifications:
mdadm mdadm/mail_to string root
# Should mdadm run monthly redundancy checks of the MD arrays?
mdadm mdadm/autocheck boolean false
EOF

# why does apt-get insist on pulling recommends?  something is strange.
# using aptitude for now, which is also ignoring --without-recommends for
# some reason, but which can at least be told explicitly to ignore 
# unneeded packages:
# courier-mta mailx bsd-mailx
#debirf_exec apt-get --assume-yes install lvm2 lsof hdparm pciutils testdisk foremost mdadm smartmontools
debirf_exec aptitude --without-recommends --assume-yes install lvm2 lsof hdparm partimage pciutils testdisk foremost mdadm smartmontools eject wodim ddrescue cryptsetup sdparm courier-mta- mailx- bsd-mailx-
