#!/bin/sh

# do this after installing the operating system distribution, before
# adjusting the configuration or restoring any data files (ai means After
# Installing)

# It is not required, but it looks nicer if you give this script a command
# line parameter which represents the name of your distribution. Command
# line parameter 1 is used as an extension to the names of the files and
# directories which are created. For example, if your distribution is named
# Shmuckware 13, run the command 'ai .shmuckware13'; and the copy of '/etc'
# will be named '/etc.orig.shmuckware13' instead of '/etc.orig'.

cd /

# save copies of the original configuration. this is not required; it has
# nothing to do with Paranoid Backup; I just think it is a good idea.
# you may not want to save copies of all of these.
cp --archive etc etc.orig$1
cp --archive usr/etc usr/etc.orig$1
cp --archive usr/local/etc usr/local/etc.orig$1
cp --archive local/etc local/etc.orig$1
cp --archive root root.orig$1
cp --archive lib/modules lib/modules.orig$1
cp --archive usr/src/linux/.config usr/src/linux/.config.orig$1

# or you can save space and inodes by saving the copy of the original
# configuration as a single archive file:
#cd /etc
#tar -cf - * | gzip -9 > /etc.orig$1
#mv /etc.orig$1 /etc

# if you are going to restore a complete set of configuration files from a
# different computer, you may want to save two copies, one of the default
# configuration of the new computer, and one of the configuration of the old
# computer. try this:
#mv etc etc.orig$1
#[restore]
#mv etc etc.old_computer
#cp --archive etc.orig$1 etc
#cp --archive etc.old_computer etc


# make starting virtual restore list
/root/Paranoidbackup/paranoidbackup.pl --make-virtual-restore-list
# if the previous command failed, then the file created by the
# next command can be used for the virtual restore list.
#ls --recursive --format=long --almost-all --full-time --numeric-uid-gid > /tmp/all_files$1
