Re: go-pear new version
| From: | Tomas V.V.Cox | Date: | Mon, 25 Mar 2002 17:27:41 +0000 |
| Subject: | Re: go-pear new version | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-5104@lists.php.net to get a copy of this message | ||
El lun, 25-03-2002 a las 16:57, Antonio Carlos Venancio Junior
escribió:
> Tomas,
>
>
> How about to check if the user is root? If so I'm sending a patch. =)
PEAR can be installed and used also by users! The design of the PEAR
Installer supports multiple different PEAR installations by for example
different users with virtual hosts in one machine, so this check will
cut that. Thanks anyway Antonio.
Tomas V.V.Cox
> --- go-pear Mon Mar 25 12:50:58 2002
> +++ go-pear-root Mon Mar 25 12:52:36 2002
> @@ -46,6 +46,12 @@
> echo " ]Š¡‰˜rþÌì
> –ÝPôhttp://cvs.php.net/co.php/pearweb/doc/pear_package_manager.txt"
> echo
>
> +whoami=$(whoami)
> +if [ $whoami != 'root' ]; then
> + echo "You need to be root to run the installer"
> +exit -1
> +fi
> +
> php=$(type -p php)
> if [ ! $php ]; then
> echo "No php cgi binary found in PATH"