From f2e4ab403a3538ccd62653b435f4d87eb8b76d27 Mon Sep 17 00:00:00 2001 From: liuxueli Date: Wed, 24 Jun 2020 13:35:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=AE=89=E8=A3=85=E6=97=B6?= =?UTF-8?q?=E6=B5=81=E6=A0=87=E7=AD=BE=E5=90=8D=E7=A7=B0TSG=5FMASTER=5FINT?= =?UTF-8?q?ERNAL=5FLABEL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- preinstall/install.sh | 31 ++++++++++++++----------------- preinstall/uninstall.sh | 3 --- 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/preinstall/install.sh b/preinstall/install.sh index 071bed7..2e7f737 100644 --- a/preinstall/install.sh +++ b/preinstall/install.sh @@ -1,22 +1,19 @@ +DST=${RPM_INSTALL_PREFIX} - echo " pre install: $1" +mkdir -p ${DST}/plug/platform/ +mkdir -p ${DST}/etc/ +touch ${DST}/plug/conflist.inf +touch ${DST}/etc/project_list.conf - DST=${RPM_INSTALL_PREFIX} +if [[ -z `grep -rn 'POLICY_PRIORITY' ${DST}/etc/project_list.conf` ]];then + echo 'POLICY_PRIORITY struct' >> ${DST}/etc/project_list.conf +fi - mkdir -p ${DST}/plug/platform/ - mkdir -p ${DST}/etc/ - touch ${DST}/plug/conflist.inf - touch ${DST}/etc/project_list.conf +if [[ -z `grep -rn 'TSG_MASTER_INTERNAL_LABEL' ${DST}/etc/project_list.conf` ]];then + echo 'TSG_MASTER_INTERNAL_LABEL long' >> ${DST}/etc/project_list.conf +fi - if [[ -z `grep -rn 'POLICY_PRIORITY' ${DST}/etc/project_list.conf` ]];then - echo 'POLICY_PRIORITY struct' >> ${DST}/etc/project_list.conf - fi - - if [[ -z `grep -rn 'ESTABLISH_LATENCY' ${DST}/etc/project_list.conf` ]];then - echo 'ESTABLISH_LATENCY long' >> ${DST}/etc/project_list.conf - fi - - if [[ -z `grep -rn 'tsg_master.inf' ${DST}/plug/conflist.inf` ]];then - sed -i '/\[platform\]/a\./plug/platform/tsg_master/tsg_master.inf' ${DST}/plug/conflist.inf - fi +if [[ -z `grep -rn 'tsg_master.inf' ${DST}/plug/conflist.inf` ]];then + sed -i '/\[platform\]/a\./plug/platform/tsg_master/tsg_master.inf' ${DST}/plug/conflist.inf +fi diff --git a/preinstall/uninstall.sh b/preinstall/uninstall.sh index ab6b2f3..de08ce9 100644 --- a/preinstall/uninstall.sh +++ b/preinstall/uninstall.sh @@ -1,7 +1,4 @@ - if [ $1 == 0 ]; then - echo "uninstall: $1" - DST=${RPM_INSTALL_PREFIX} mkdir -p ${DST}/plug/platform/