diff options
author | 2015-12-10 17:35:55 -0500 | |
---|---|---|
committer | 2015-12-10 17:35:55 -0500 | |
commit | 80898dea109417f9b8990837a4292ed90018f8d9 (patch) | |
tree | 98e1c9c500e03472e7a70310e578521ee7bf9f24 | |
parent | Switch get_active_apache2() and set_apache2() to the new mod_php.so symlink. (diff) | |
download | eselect-php-80898dea109417f9b8990837a4292ed90018f8d9.tar.gz eselect-php-80898dea109417f9b8990837a4292ed90018f8d9.tar.bz2 eselect-php-80898dea109417f9b8990837a4292ed90018f8d9.zip |
Use {cli,cgi,fpm}_link variables where appropriate.
These variables were all defined but not used. There were a few places
where they could be profitably inserted.
-rw-r--r-- | src/php.eselect.in | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/php.eselect.in b/src/php.eselect.in index 4bbc695..ea8676f 100644 --- a/src/php.eselect.in +++ b/src/php.eselect.in @@ -139,21 +139,21 @@ find_targets_cgi() { get_active_cli() { # See get_active_apache2() for an explanation of the sed call. - local target=$(canonicalise "${EROOT}"/usr/bin/php) + local target=$(canonicalise "${cli_link}") local ver="s:.*/usr/.*/\(php[0-9]\.[0-9][0-9]*\)/bin/php:\1:p" [[ -a "${target}" ]] && echo "${target}" | @SED@ -ne "${ver}" } get_active_cgi() { # See get_active_apache2() for an explanation of the sed call. - local target=$(canonicalise "${EROOT}"/usr/bin/php-cgi) + local target=$(canonicalise "${cgi_link}") local ver="s:.*/usr/.*/\(php[0-9]\.[0-9][0-9]*\)/bin/php-cgi:\1:p" [[ -a "${target}" ]] && echo "${target}" | @SED@ -ne "${ver}" } get_active_fpm() { # See get_active_apache2() for an explanation of the sed call. - local target=$(canonicalise "${EROOT}"/usr/bin/php-fpm) + local target=$(canonicalise "${fpm_link}") local ver="s:.*/usr/.*/\(php[0-9]\.[0-9][0-9]*\)/bin/php-fpm:\1:p" [[ -a "${target}" ]] && echo "${target}" | @SED@ -ne "${ver}" } @@ -308,7 +308,7 @@ set_cgi() { t=$(resolv_target cgi $1) [[ -z $t ]] && die -q "invalid target" @LN_S@ --force "../..$(get_active_libdir)/${t}/bin/php-cgi" \ - "${EROOT}"/usr/bin/php-cgi || \ + "${cgi_link}" || \ die -q "failed to create active php-cgi symlink" } @@ -316,7 +316,7 @@ set_fpm() { local t=$(resolv_target fpm $1) [[ -z $t ]] && die -q "invalid target" @LN_S@ --force "../..$(get_active_libdir)/${t}/bin/php-fpm" \ - "${EROOT}"/usr/bin/php-fpm || \ + "${fpm_link}" || \ die -q "failed to create symlink for the php-fpm binary" echo "Please restart php-fpm for the changes to take effect." } |