6 mkdir -p $configdir/$file
7 rsync -av $file $configdir/$file/$myip
12 if [ "$cat" = "dir" ] ; then
13 rsync -av $object/ $backupdir/$object
14 elif [ "$cat" = "file" ] ; then
16 rsync -av $object $backupdir/$dirname/
18 echo "warning: dont know how to handle $cat"
23 cserver="hermes" # configs which may be restored by fai
24 rcdir="/mnt/extra/hdw-linux/fai/files"
27 bserver="hermes" # data not usable for fai
28 rbdir="/mnt/extra/backup"
31 # initializing custom variables
33 myip="`host $host | awk '{ print $4 }'`"
35 if [ "$res" != "0" ] ; then
36 echo "unable to determine the hosts ip address"
40 echo "warning: the correct ip address is essential"
41 echo "please make sure it is the correct one"
42 echo "is the ip address correct? -> $myip [y/n]"
44 [ "$answer" != "y" ] && exit 1
46 # mount backup and config space
47 if [ -d $configdir -a -d $backupdir ] ; then
48 mount $cserver:$rcdir $configdir
50 if [ "$res" != "0" ] ; then
51 echo "unable to mount configdir"
54 mount $bserver:$rbdir $backupdir
55 if [ "$res" != "0" ] ; then
56 echo "unable to mount backupdir"
60 [ "$res" = "0" ] && b_mounted=1
62 echo "$configdir or $backupdir (or both) doesn't exist"
67 for configfile in /usr/src/linux/.config; do
68 [ -f $configfile ] && configcp $configfile
70 for onefile in profile network kernel wireless; do
71 configfile="/etc/conf/$onefile"
72 [ -f $configfile ] && configcp $configfile
74 for configfile in /etc/cron.d/* /var/spool/cron/crontabs/*; do
75 [ -f $configfile ] && configcp $configfile
77 for configfile in /etc/udev/rules.d/udev.rules /etc/X11/xorg.conf* \
78 /etc/opt/apache2/{httpd,ssl}.conf /etc/cups/cupsd.conf \
79 /etc/ppp/{pppoe.conf,ip-up,ip-down,pap-secrets} ; do
80 [ -f $configfile ] && configcp $configfile
82 for i in dhcpd.conf fstab hosts host.conf hosts.allow hosts.deny lilo.conf \
83 profile sendmail.cf resolv.conf exports fb.modes inetd.conf \
84 xinetd.conf mp3user mp3db.conf modules.conf named.conf \
85 modprobe.devfs modprobe.conf crontab ethers HOSTNAME; do
86 [ -f /etc/$i ] && configcp /etc/$i
88 for configfile in /var/named/*; do
89 [ -f $configfile ] && configcp $configfile
91 for configfile in /home/*/{xinitrc,.Xdefaults,.XHkeys,.directfbrc,.bashrc} \
92 /home/*/{.signature,sp12/*,.licq,.irssi,.ssh/*} ; do
93 [ -f $configfile ] && configcp $configfile
95 for configfile in `find /tftpboot -type f`; do