diff --git a/packaging/tools/install.sh b/packaging/tools/install.sh index 33097bd5411f0fc0239b7e571a69de4a6f8408fc..bb87d910761b73f2f7a0d83bda8bfb42c5068771 100755 --- a/packaging/tools/install.sh +++ b/packaging/tools/install.sh @@ -455,7 +455,7 @@ function install_blm3_config() { fi [ -f ${script_dir}/cfg/blm.toml ] && - ${csudo} cp -f ${script_dir}/cfg/blm.toml ${install_main_dir}/cfg/blm.toml.org + ${csudo} cp -f ${script_dir}/cfg/blm.toml ${cfg_install_dir}/blm.toml.new [ -f ${cfg_install_dir}/blm.toml ] && ${csudo} ln -s ${cfg_install_dir}/blm.toml ${install_main_dir}/cfg/blm.toml @@ -473,7 +473,7 @@ function install_config() { ${csudo} chmod 644 ${cfg_install_dir}/* fi - ${csudo} cp -f ${script_dir}/cfg/taos.cfg ${install_main_dir}/cfg/taos.cfg.org + ${csudo} cp -f ${script_dir}/cfg/taos.cfg ${cfg_install_dir}/taos.cfg.new ${csudo} ln -s ${cfg_install_dir}/taos.cfg ${install_main_dir}/cfg [ ! -z $1 ] && return 0 || : # only install client diff --git a/packaging/tools/make_install.sh b/packaging/tools/make_install.sh index c29c1cd665a11596b83234d1b0343bbab1cf5dc1..8052f4e8112be500af6cf135a87eb64034b4bf40 100755 --- a/packaging/tools/make_install.sh +++ b/packaging/tools/make_install.sh @@ -351,15 +351,13 @@ function install_config() { [ -f ${script_dir}/../cfg/taos.cfg ] && ${csudo} cp ${script_dir}/../cfg/taos.cfg ${cfg_install_dir} ${csudo} chmod 644 ${cfg_install_dir}/taos.cfg - ${csudo} cp -f ${script_dir}/../cfg/taos.cfg ${install_main_dir}/cfg/taos.cfg.org - ${csudo} ln -s ${cfg_install_dir}/taos.cfg ${install_main_dir}/cfg/taos.cfg + ${csudo} cp -f ${script_dir}/../cfg/taos.cfg \ + ${cfg_install_dir}/taos.cfg.${verNumber} + ${csudo} ln -s ${cfg_install_dir}/taos.cfg \ + ${install_main_dir}/cfg/taos.cfg else - if [ "$osType" != "Darwin" ]; then - ${csudo} cp -f ${script_dir}/../cfg/taos.cfg ${install_main_dir}/cfg/taos.cfg.org - else - ${csudo} cp -f ${script_dir}/../cfg/taos.cfg ${install_main_dir}/cfg/taos.cfg.org\ - || ${csudo} cp -f ${script_dir}/../cfg/taos.cfg ${install_main_2_dir}/cfg/taos.cfg.org - fi + ${csudo} cp -f ${script_dir}/../cfg/taos.cfg \ + ${cfg_install_dir}/taos.cfg.${verNumber} fi } @@ -371,19 +369,15 @@ function install_blm3_config() { [ -f ${cfg_install_dir}/blm.toml ] && ${csudo} chmod 644 ${cfg_install_dir}/blm.toml [ -f ${binary_dir}/test/cfg/blm.toml ] && - ${csudo} cp -f ${binary_dir}/test/cfg/blm.toml ${install_main_dir}/cfg/blm.toml.org - [ -f ${cfg_install_dir}/blm.toml ] && - ${csudo} ln -s ${cfg_install_dir}/blm.toml ${install_main_dir}/cfg/blm.toml + ${csudo} cp -f ${binary_dir}/test/cfg/blm.toml \ + ${cfg_install_dir}/blm.toml.${verNumber} + [ -f ${cfg_install_dir}/blm.toml ] && \ + ${csudo} ln -s ${cfg_install_dir}/blm.toml \ + ${install_main_dir}/cfg/blm.toml else if [ -f "${binary_dir}/test/cfg/blm.toml" ]; then - if [ "$osType" != "Darwin" ]; then - ${csudo} cp -f ${binary_dir}/test/cfg/blm.toml \ - ${install_main_dir}/cfg/blm.toml.org - else - ${csudo} cp -f ${binary_dir}/test/cfg/blm.toml ${install_main_dir}/cfg/blm.toml.org \ - || ${csudo} cp -f ${binary_dir}/test/cfg/blm.toml \ - ${install_main_2_dir}/cfg/blm.toml.org - fi + ${csudo} cp -f ${binary_dir}/test/cfg/blm.toml \ + ${cfg_install_dir}/blm.toml.${verNumber} fi fi } diff --git a/packaging/tools/post.sh b/packaging/tools/post.sh index 87f17fb56a2b07bbe91ae93caf70c26383680e7c..2f6d9ac78407724ed7e216a32c621a1aa75ee788 100755 --- a/packaging/tools/post.sh +++ b/packaging/tools/post.sh @@ -301,7 +301,7 @@ function install_blm3_config() { fi [ -f ${cfg_dir}/blm.toml ] && - ${csudo} mv ${cfg_dir}/blm.toml ${cfg_dir}/blm.toml.org + ${csudo} mv ${cfg_dir}/blm.toml ${cfg_dir}/blm.toml.new [ -f ${cfg_install_dir}/blm.toml ] && ${csudo} ln -s ${cfg_install_dir}/blm.toml ${cfg_dir} @@ -322,7 +322,7 @@ function install_config() { # restore the backup standard input, and turn off 6 exec 0<&6 6<&- - ${csudo} mv ${cfg_dir}/taos.cfg ${cfg_dir}/taos.cfg.org + ${csudo} mv ${cfg_dir}/taos.cfg ${cfg_dir}/taos.cfg.new ${csudo} ln -s ${cfg_install_dir}/taos.cfg ${cfg_dir} #FQDN_FORMAT="(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)" #FQDN_FORMAT="(:[1-6][0-9][0-9][0-9][0-9]$)" diff --git a/packaging/tools/preun.sh b/packaging/tools/preun.sh index 7f6ef5c27d182fcaa1f9ea80f1169b389db8b014..f6daeefdd50e0162436191281c87d70cde0780ce 100755 --- a/packaging/tools/preun.sh +++ b/packaging/tools/preun.sh @@ -124,7 +124,7 @@ ${csudo} rm -f ${bin_link_dir}/blm3 || : ${csudo} rm -f ${bin_link_dir}/taosdemo || : ${csudo} rm -f ${bin_link_dir}/taosdump || : ${csudo} rm -f ${bin_link_dir}/set_core || : -${csudo} rm -f ${cfg_link_dir}/* || : +${csudo} rm -f ${cfg_link_dir}/*.new || : ${csudo} rm -f ${inc_link_dir}/taos.h || : ${csudo} rm -f ${inc_link_dir}/taoserror.h || : ${csudo} rm -f ${lib_link_dir}/libtaos.* || : diff --git a/packaging/tools/startPre.sh b/packaging/tools/startPre.sh index 731f5b396f4bed78488a659dbb2b13e832deccf6..8a0ab11a4d37ffb9ad244faa2946cbbf10ce2026 100755 --- a/packaging/tools/startPre.sh +++ b/packaging/tools/startPre.sh @@ -9,8 +9,8 @@ line=`grep StartLimitBurst ${taosd}` num=${line##*=} #echo "burst num: ${num}" -startSeqFile=/usr/local/taos/.startSeq -recordFile=/usr/local/taos/.startRecord +startSeqFile=/var/log/taos/.startSeq +recordFile=/var/log/taos/.startRecord startSeq=0