summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/php.eselect.in.in28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/php.eselect.in.in b/src/php.eselect.in.in
index ff3914f..7e52f53 100644
--- a/src/php.eselect.in.in
+++ b/src/php.eselect.in.in
@@ -173,14 +173,6 @@ parse_target_major_version() {
esac
}
-cleanup_sapis() {
- local m
- local link
- for m in $MODULES ; do
- cleanup_sapi $m
- done
-}
-
cleanup_sapi() {
local sapi="${1}"
local l="${sapi}_link"
@@ -197,11 +189,6 @@ cleanup_sapi() {
fi
fi
- if [[ "${sapi}" == "apache2" ]] ; then
- rm -f "@LIBDIR@"/apache2/modules/libphp[57].so \
- || die "failed to remove old libphp.so symlink"
- fi
-
return 1
}
@@ -582,5 +569,18 @@ describe_cleanup_options() {
}
do_cleanup() {
- cleanup_sapis
+ for sapi in $MODULES ; do
+ cleanup_sapi "${sapi}"
+ done
+
+ # Remove older (and dead) apache2 symlinks. These days the symlink
+ # is called mod_php.so. This cleanup code can be removed after a
+ # while, after we think most people will have switched to the new
+ # symlink and removed the old one.
+ for link in "@LIBDIR@"/apache2/modules/libphp[57].so; do
+ if [[ -L "${link}" && ! -e "${link}" ]] ; then
+ rm -f "${link}" || die "failed to remove old libphp.so symlink"
+ echo "Removed broken symlink ${link}."
+ fi
+ done
}