修复rpm -U安装时配置文件被覆盖
This commit is contained in:
11
cmake/preInstall.sh
Normal file
11
cmake/preInstall.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
DST=${RPM_INSTALL_PREFIX}
|
||||
mkdir -p ${DST}/plug/protocol/
|
||||
touch ${DST}/plug/conflist.inf
|
||||
touch ${DST}/etc/entrylist.conf
|
||||
if [[ -z `grep -rn 'quic.inf' ${DST}/plug/conflist.inf` ]];then
|
||||
sed -i '/\[protocol\]/a\./plug/protocol/quic/quic.inf' ${DST}/plug/conflist.inf
|
||||
fi
|
||||
if [[ -z `grep -rn 'quic' ${DST}etc/entrylist.conf` ]];then
|
||||
echo "QUIC" >> ${DST}etc/entrylist.conf
|
||||
fi
|
||||
6
cmake/preUninstall.sh
Normal file
6
cmake/preUninstall.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
DST=${RPM_INSTALL_PREFIX}
|
||||
mkdir -p ${DST}/plug/business/
|
||||
touch ${DST}/plug/conflist.inf
|
||||
sed -i '/quic.inf/d' ${DST}/plug/conflist.inf
|
||||
sed -i '/QUIC/d' ${DST}etc/entrylist.conf
|
||||
Reference in New Issue
Block a user