• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Révision58e4a40e7e0d7ff6eb03866734cb0244df3c9fab (tree)
l'heure2010-10-04 14:26:48
Auteur0809216 <0809216@1ed6...>
Commiter0809216

Message de Log

Change file name

git-svn-id: http://10.144.169.20/repos/um/branches/l7vsd-3.x-ramiel-epoll-cond@10325 1ed66053-1c2d-0410-8867-f7571e6e31d3

Change Summary

Modification

--- a/test/script/common/save_file.sh
+++ b/test/script/common/backup_file.sh
@@ -1,7 +1,7 @@
11 #!/bin/bash
22
3-#Save configfiles and logfiles.
4-LOG "save_file start."
3+# Backup config files and log files.
4+LOG "backup_file start."
55
66 if [ -e /etc/hosts ]
77 then
@@ -15,9 +15,9 @@ else
1515 fi
1616 if [ $? -ne 0 ]
1717 then
18- LOG_ERR "/etc/hosts file move failed."
18+ LOG_ERR "Cannot move /etc/hosts file."
1919 else
20- LOG "/etc/hosts file moved ${TMP_DIR}/etc ."
20+ LOG "/etc/hosts file was moved to ${TMP_DIR}/etc/hosts."
2121 fi
2222
2323 if [ -n ${L7VSD_CONF_DIR} -a ${L7VSD_CONF_DIR} != "/" ]
@@ -32,12 +32,11 @@ else
3232 fi
3333 if [ $? -ne 0 ]
3434 then
35- LOG_ERR "l7vs config file move failed."
35+ LOG_ERR "Cannot move ${L7VSD_CONF_DIR}/* files."
3636 else
37- LOG "l7vs config file moved ${TMP_DIR}/l7vs ."
37+ LOG "${L7VSD_CONF_DIR}/* files were moved to ${TMP_DIR}/l7vs directory."
3838 fi
3939
40-
4140 if [ -n ${L7DIRECTORD_CONF_DIR} -a ${L7DIRECTORD_CONF_DIR} != "/" ]
4241 then
4342 if [ ! -d ${TMP_DIR}/l7director ]
@@ -50,12 +49,11 @@ else
5049 fi
5150 if [ $? -ne 0 ]
5251 then
53- LOG_ERR "l7director config file move failed."
52+ LOG_ERR "Cannot move ${L7DIRECTORD_CONF_DIR}/* files."
5453 else
55- LOG "l7director config file moved ${TMP_DIR}/l7direcotr ."
54+ LOG "${L7DIRECTORD_CONF_DIR}/* files were moved to ${TMP_DIR}/l7direcotr directory."
5655 fi
5756
58-
5957 if [ -n ${L7VS_LOG_DIR} -a ${L7VS_LOG_DIR} != "/" ]
6058 then
6159 if [ ! -d ${TMP_DIR}/log ]
@@ -68,9 +66,9 @@ else
6866 fi
6967 if [ $? -ne 0 ]
7068 then
71- LOG_ERR "UM-L7's log file move failed."
69+ LOG_ERR "Cannot move ${L7VS_LOG_DIR}/* files."
7270 else
73- LOG "UM-L7's log file moved ${TMP_DIR}log ."
71+ LOG "${L7VS_LOG_DIR}/* files were moved to ${TMP_DIR}log directory."
7472 fi
7573
76-LOG "save_file end."
74+LOG "backup_file end."
--- /dev/null
+++ b/test/script/common/restore_file.sh
@@ -0,0 +1,38 @@
1+#!/bin/bash
2+
3+# Restore config files and log files.
4+LOG "restore_file start."
5+
6+\mv -f ${TMP_DIR}/etc/hosts /etc/hosts 2> /dev/null
7+if [ $? -ne 0 ]
8+then
9+ LOG_ERR "Cannot move ${TMP_DIR}/etc/hosts file."
10+else
11+ LOG "/etc/hosts file was restored."
12+fi
13+
14+mv ${TMP_DIR}/l7vs/* ${L7VSD_CONF_DIR} 2> /dev/null
15+if [ $? -ne 0 ]
16+then
17+ LOG_ERR "Cannot move ${TMP_DIR}/l7vs/* files."
18+else
19+ LOG "${L7VSD_CONF_DIR}/* files were restored."
20+fi
21+
22+mv ${TMP_DIR}/l7director/* ${L7DIRECTORD_CONF_DIR} 2> /dev/null
23+if [ $? -ne 0 ]
24+then
25+ LOG_ERR "Cannot move ${TMP_DIR}/l7director/* files."
26+else
27+ LOG "${L7DIRECTORD_CONF_DIR}/* files were restored."
28+fi
29+
30+mv ${TMP_DIR}/log/* ${L7VS_LOG_DIR} 2> /dev/null
31+if [ $? -ne 0 ]
32+then
33+ LOG_ERR "Cannot move ${TMP_DIR}/log/* files."
34+else
35+ LOG "${L7VS_LOG_DIR}/* files were restored."
36+fi
37+
38+LOG "restore_file end."
--- a/test/script/common/return_file.sh
+++ /dev/null
@@ -1,38 +0,0 @@
1-#!/bin/bash
2-
3-#Return configfiles and logfiles.
4-LOG "return_file start."
5-
6-\mv -f ${TMP_DIR}/etc/hosts /etc/hosts 2> /dev/null
7-if [ $? -ne 0 ]
8-then
9- LOG_ERR "${TMP_DIR}/etc/hosts file move failed."
10-else
11- LOG "/etc/hosts file return ${L7VSD_CONF_DIR} ."
12-fi
13-
14-mv ${TMP_DIR}/l7vs/* ${L7VSD_CONF_DIR} 2> /dev/null
15-if [ $? -ne 0 ]
16-then
17- LOG_ERR "l7vs config file move failed."
18-else
19- LOG "l7vs config file return ${L7VSD_CONF_DIR} ."
20-fi
21-
22-mv ${TMP_DIR}/l7director/* ${L7DIRECTORD_CONF_DIR} 2> /dev/null
23-if [ $? -ne 0 ]
24-then
25- LOG_ERR "l7director config file move failed."
26-else
27- LOG "l7director config file return ${L7DIRECTORD_CONF_DIR} ."
28-fi
29-
30-mv ${TMP_DIR}/log/* ${L7VS_LOG_DIR} 2> /dev/null
31-if [ $? -ne 0 ]
32-then
33- LOG_ERR "UM-L7's log file move failed."
34-else
35- LOG "UM-L7's log file return ${L7VS_LOG_DIR} ."
36-fi
37-
38-LOG "return_file end."
--- a/test/umtest.sh
+++ b/test/umtest.sh
@@ -12,8 +12,8 @@ CHECK_ENV="${COMMON_SCRIPT_DIR}/check_env.sh"
1212 LOGGER="${COMMON_SCRIPT_DIR}/logger.sh"
1313 LIGHTTPD_FUNC="${COMMON_SCRIPT_DIR}/lighttpd_func.sh"
1414 STOP_MONKEY="${COMMON_SCRIPT_DIR}/stop_um_ps.sh"
15-SAVE_FILE="${COMMON_SCRIPT_DIR}/save_file.sh"
16-RETURN_FILE="${COMMON_SCRIPT_DIR}/return_file.sh"
15+BACKUP_FILE="${COMMON_SCRIPT_DIR}/backup_file.sh"
16+RESTORE_FILE="${COMMON_SCRIPT_DIR}/restore_file.sh"
1717 COLLECT_FILE="${COMMON_SCRIPT_DIR}/collect_file.sh"
1818 SET_DEFAULT_CONF="${COMMON_SCRIPT_DIR}/set_default_conf.sh"
1919 START_SNMPD="${COMMON_SCRIPT_DIR}/start_snmpd.sh"
@@ -163,8 +163,8 @@ shift `expr "$OPTIND" - 1`
163163 . ${CHECK_ENV}
164164 # Stop UltraMonkey-L7.
165165 . ${STOP_MONKEY}
166-# Save log and config files.
167-. ${SAVE_FILE}
166+# Backup log and config files.
167+. ${BACKUP_FILE}
168168 # Initialize environment.
169169 \cp -f ${CONF_DIR}/hosts /etc/hosts
170170 . ${LIGHTTPD_FUNC}
@@ -202,8 +202,8 @@ LOG "Test scripts end."
202202 ###################
203203 # Stop UltraMonkey-L7.
204204 . ${STOP_MONKEY}
205-# Return log and config files.
206-. ${RETURN_FILE}
205+# Restore log and config files.
206+. ${RESTORE_FILE}
207207 # Delete temp directory
208208 rm -rf ${TMP_DIR}
209209 exit 0