1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
#!/bin/sh
set -e
echo ""
echo "WARNING:"
echo " Be careful who you put in group 'disk', since this"
echo " may give access to files that only root should be "
echo " allowed to access."
echo ""
diskaccess=`grep disk /etc/group | cut -f 4 -d:`
echo "On this computer, group 'disk' includes the following person(s):"
if [ -z "$diskaccess" ]; then echo " (no one)"
else echo " "$diskaccess
fi
echo ""
FSTAB=/etc/fstab
dumpfreq=`awk '!/^#/ { if ($5 != 0) printf "%d ",$5 }; END { printf "\n"; }'\
$FSTAB`
if [ -z "$dumpfreq" ]; then
echo " Your $FSTAB file contains zeroes in the dump frequencies fields"
echo " for all your filesystems. This tells dump that you never intend"
echo " to backup your drives. In particular, this will keep the -w and"
echo " -W options to dump from working."
echo ""
echo " Edit the $FSTAB file to implement your local backup policy."
echo ""
fi
if [ -L /etc/dumpdates ]; then
echo "Your /etc/dumpdates is a symlink. I wasn't expecting that. Dump"
echo "will look for dumpdates in /var/lib/dumpdates. Please fix things."
fi
if [ -f /etc/dumpdates -a ! -f /var/lib/dumpdates ]; then
echo "Moving existing /etc/dumpdates to /var/lib for FHS compliance."
mv /etc/dumpdates /var/lib/dumpdates
fi
# make sure it exists...
if [ ! -f /var/lib/dumpdates ]; then
echo "Creating /var/lib/dumpdates, used to record dates of dumps."
touch /var/lib/dumpdates
fi
echo "Ensuring /var/lib/dumpdates is writeable by group disk."
chown root /var/lib/dumpdates
chgrp disk /var/lib/dumpdates
chmod 664 /var/lib/dumpdates
echo ""
#DEBHELPER#
exit 0
|