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
34 myip="`host $host | awk '{ print $4 }'`"
39 if [ "$res" != "0" ] ; then
40 echo "unable to determine the hosts ip address"
44 echo "warning: the correct ip address is essential"
45 echo "please make sure it is the correct one"
46 echo "is the ip address correct? -> $myip [y/n]"
48 [ "$answer" != "y" ] && exit 1
50 # mount backup and config space
51 if [ -d $configdir -a -d $backupdir ] ; then
52 mount $cserver:$rcdir $configdir
54 if [ "$res" != "0" ] ; then
55 echo "unable to mount configdir"
58 mount $bserver:$rbdir $backupdir
59 if [ "$res" != "0" ] ; then
60 echo "unable to mount backupdir"
64 [ "$res" = "0" ] && b_mounted=1
66 echo "$configdir or $backupdir (or both) doesn't exist"
71 for configfile in /usr/src/linux/.config; do
72 [ -f $configfile ] && configcp $configfile
74 for onefile in profile network kernel wireless; do
75 configfile="/etc/conf/$onefile"
76 [ -f $configfile ] && configcp $configfile
78 for configfile in /etc/cron.d/* /var/spool/cron/crontabs/*; do
79 [ -f $configfile ] && configcp $configfile
81 for configfile in /etc/udev/rules.d/udev.rules /etc/X11/xorg.conf* \
82 /etc/opt/apache2/{httpd,ssl}.conf /etc/cups/cupsd.conf \
83 /etc/ppp/{pppoe.conf,ip-up,ip-down,pap-secrets} ; do
84 [ -f $configfile ] && configcp $configfile
86 for i in dhcpd.conf fstab hosts host.conf hosts.allow hosts.deny lilo.conf \
87 profile sendmail.cf resolv.conf exports fb.modes inetd.conf \
88 xinetd.conf mp3user mp3db.conf modules.conf named.conf \
89 modprobe.devfs modprobe.conf crontab ethers HOSTNAME; do
90 [ -f /etc/$i ] && configcp /etc/$i
92 for configfile in /var/named/*; do
93 [ -f $configfile ] && configcp $configfile
95 for configfile in /home/*/{xinitrc,.Xdefaults,.XHkeys,.directfbrc,.bashrc} \
96 /home/*/{.signature,sp12/*,.licq,.irssi,.ssh/*} ; do
97 [ -f $configfile ] && configcp $configfile
99 for configfile in `find /tftpboot -type f`; do