/[BackupPC]/trunk/xls2conf/Makefile
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/xls2conf/Makefile

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 22 by dpavlin, Mon Jul 11 15:53:59 2005 UTC revision 243 by dpavlin, Wed Nov 30 11:36:18 2005 UTC
# Line 1  Line 1 
1    backuppc_data=/data/backuppc/data/
2    xls_file=analitika.xls
3    ip_range='(10.210.10[01]|10.42.101)'
4    
5  all:  all:
6          rm conf/*          echo "usage: make [agi|qc]
7          ./analitika2conf.pl analitika.xls  
8          cp -f Makefile.install conf/Makefile  agi:
9          rsync -rav conf/ 10.210.99.1:conf/          sudo make convert backuppc_data=/data/backuppc-agi/data xls_file=agi.xls ip_range='(10.210.100)'
10            /etc/init.d/backuppc-agi restart
11    
12    qc:
13            sudo make convert backuppc_data=/data/backuppc-qc/data xls_file=qc.xls ip_range='(10.210.101|10.42.101)'
14            /etc/init.d/backuppc-qc restart
15    
16    convert:
17            echo "using $(xls_file) to dir $(backuppc_data)"
18    
19            test -d conf || mkdir conf
20            rm conf/* || true
21            ./xls2conf.pl $(xls_file)
22    
23            grep -v asa $(backuppc_data)/conf/hosts > conf/hosts.backuppc.orig
24            cat conf/hosts.backuppc.orig conf/hosts.backuppc > conf/hosts.backuppc.new
25    
26            cat /etc/hosts | egrep -v "$(ip_range)" > conf/hosts.orig
27            cat conf/hosts.orig conf/hosts.add > conf/hosts.new
28    
29    
30            mv $(backuppc_data)/conf/hosts $(backuppc_data)/conf/hosts.bak
31            mv conf/hosts.backuppc.new $(backuppc_data)/conf/hosts
32            mv /etc/hosts /etc/hosts.bak
33            mv conf/hosts.new /etc/hosts
34    
35            cp conf/*.pl $(backuppc_data)/conf/
36    

Legend:
Removed from v.22  
changed lines
  Added in v.243

  ViewVC Help
Powered by ViewVC 1.1.26