diff options
| author | songyanchao <[email protected]> | 2024-03-20 09:47:06 +0800 |
|---|---|---|
| committer | songyanchao <[email protected]> | 2024-03-20 09:47:06 +0800 |
| commit | 184cd89d41df6550127516e17500c1c4bf3da174 (patch) | |
| tree | bb4f815676ee1a90b931c53347158c1973209c5e /cmake/PostUninstall.in | |
| parent | a8ada69f7e08632c6d9db72295e0f54495628372 (diff) | |
🐞 fix: Correct error where rpm -u unintentionally triggers update-alternatives.
Correct error where rpm -u unintentionally triggers update-alternatives
Diffstat (limited to 'cmake/PostUninstall.in')
| -rw-r--r-- | cmake/PostUninstall.in | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/PostUninstall.in b/cmake/PostUninstall.in index 13f0a89..8c94d9f 100644 --- a/cmake/PostUninstall.in +++ b/cmake/PostUninstall.in @@ -1,5 +1,7 @@ %systemd_postun_with_restart mrenv.service mrzcpd.service mrtunnat.service /sbin/ldconfig -command="update-alternatives --remove mrzcpd @CMAKE_INSTALL_PREFIX@/@MR_INSTALL_BINDIR@/mrzcpd --altdir @CMAKE_INSTALL_PREFIX@/altdir" +if [ $ 1 -gt 0 ]; then + command="update-alternatives --remove mrzcpd @CMAKE_INSTALL_PREFIX@/@MR_INSTALL_BINDIR@/mrzcpd --altdir @CMAKE_INSTALL_PREFIX@/altdir" eval $command +fi |
