Import from Clearcase LIV_TRC6500_V2.2.3
[debian6500.git] / install / scripts / updateconfigTRC6500.bat
1 @echo off
2
3 set session=root
4 set machine_IP=10.133.28.160
5
6 set pc_chemin_winscp=C:\"Program Files"\WinSCP\
7 set pc_chemin_config=C:\temp\config_trc6500\
8
9
10 echo Mise � jour de la configuration du TRC6500...
11
12 ping -n 1 %machine_IP% | find "TTL" > NUL
13 if errorlevel 1 goto cible_injoignable
14
15
16
17
18 cd %pc_chemin_winscp%
19 set cmd=winscp %session% /command lcd" %pc_chemin_config%/new" call" rm config.tar.gz" call" mkdir -p temp" put" config.tar.gz " call" tar xzf config.tar.gz -C temp/" call" cat temp/dhcpd.conf.user >/etc/dhcp3/dhcpd.conf.user" call" cat temp/hosts.user >/etc/hosts" call" cat temp/hosts.user > ../system_esclave/etc/hosts" call" ../scripts/create_image.sh" call" rm -rf temp" call" rm -f ../boot_reseau/initramfs.*" call" ../scripts/create_bootloader.sh" call" /etc/init.d/dhcp3-server restart " exit
20
21 echo %cmd%
22 %cmd%
23
24
25 pause
26 exit 0
27
28
29
30
31
32
33 :cible_injoignable
34 echo.
35 echo Erreur : Machine cible (%machine_IP%) non joignable
36 echo.
37 pause
38 exit 1