修复update rpm时配置文件被覆盖
修复/opt/tsg/etc/tsg_sn.json中配置sn不正确导致重启的BUG
This commit is contained in:
@@ -1,18 +1,22 @@
|
||||
#!/bin/sh
|
||||
DST=${RPM_INSTALL_PREFIX}
|
||||
mkdir -p ${DST}/plug/platform/
|
||||
mkdir -p ${DST}/etc/
|
||||
touch ${DST}/plug/conflist.inf
|
||||
touch ${DST}/etc/project_list.conf
|
||||
|
||||
if [[ -z `grep -rn 'POLICY_PRIORITY' ${DST}/etc/project_list.conf` ]];then
|
||||
echo 'POLICY_PRIORITY struct' >> ${DST}/etc/project_list.conf
|
||||
fi
|
||||
echo " pre install: $1"
|
||||
|
||||
if [[ -z `grep -rn 'ESTABLISH_LATENCY' ${DST}/etc/project_list.conf` ]];then
|
||||
echo 'TSG_MASTER_INTERNAL_LABEL struct' >> ${DST}/etc/project_list.conf
|
||||
fi
|
||||
DST=${RPM_INSTALL_PREFIX}
|
||||
|
||||
mkdir -p ${DST}/plug/platform/
|
||||
mkdir -p ${DST}/etc/
|
||||
touch ${DST}/plug/conflist.inf
|
||||
touch ${DST}/etc/project_list.conf
|
||||
|
||||
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
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
#!/bin/sh
|
||||
DST=${RPM_INSTALL_PREFIX}
|
||||
mkdir -p ${DST}/plug/platform/
|
||||
sed -i '/tsg_master.inf/d' ${DST}/plug/conflist.inf
|
||||
sed -i '/POLICY_PRIORITY/d' ${DST}/etc/project_list.conf
|
||||
sed -i '/TSG_MASTER_INTERNAL_LABEL/d' ${DST}/etc/project_list.conf
|
||||
|
||||
if [ $1 == 0 ]; then
|
||||
echo "uninstall: $1"
|
||||
|
||||
DST=${RPM_INSTALL_PREFIX}
|
||||
|
||||
mkdir -p ${DST}/plug/platform/
|
||||
sed -i '/tsg_master.inf/d' ${DST}/plug/conflist.inf
|
||||
sed -i '/POLICY_PRIORITY/d' ${DST}/etc/project_list.conf
|
||||
sed -i '/ESTABLISH_LATENCY/d' ${DST}/etc/project_list.conf
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user