diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-02-04 05:28:59 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-02-04 05:28:59 +0000 |
commit | 8531927dc0a6ffb7ca138132b3604066533781a5 (patch) | |
tree | 5e2d9266b2171716340841dd7d1d9f247a46208e | |
parent | 2a9e28b5b44dd6b181110307b75fed764590b46e (diff) | |
download | portage-8531927dc0a6ffb7ca138132b3604066533781a5.tar.gz portage-8531927dc0a6ffb7ca138132b3604066533781a5.tar.bz2 portage-8531927dc0a6ffb7ca138132b3604066533781a5.zip |
touchup code so we handle errors better
svn path=/main/trunk/; revision=2652
-rwxr-xr-x | bin/doconfd | 11 | ||||
-rwxr-xr-x | bin/doenvd | 11 | ||||
-rwxr-xr-x | bin/doinitd | 11 |
3 files changed, 15 insertions, 18 deletions
diff --git a/bin/doconfd b/bin/doconfd index e48321637..e9ea1fdfb 100755 --- a/bin/doconfd +++ b/bin/doconfd @@ -3,13 +3,12 @@ # Distributed under the terms of the GNU General Public License v2 # $Id: /var/cvsroot/gentoo-src/portage/bin/doconfd,v 1.2.2.1 2005/01/13 04:51:56 vapier Exp $ -if [ ${#} -lt 1 ] ; then - echo "doconfd: at least one argument needed" +if [[ $# -lt 1 ]] ; then + echo "$0: at least one argument needed" 1>&2 exit 1 fi -tmp_INSDESTTREE="${INSDESTTREE}" -INSDESTTREE=/etc/conf.d/ +exec \ +env \ +INSDESTTREE="/etc/conf.d/" \ doins "$@" -INSDESTTREE="${tmp_INSDESTTREE}" -unset tmp_INSDESTTREE diff --git a/bin/doenvd b/bin/doenvd index 01197a07d..5232ed908 100755 --- a/bin/doenvd +++ b/bin/doenvd @@ -3,13 +3,12 @@ # Distributed under the terms of the GNU General Public License v2 # $Id: /var/cvsroot/gentoo-src/portage/bin/doenvd,v 1.2.2.1 2005/01/13 04:51:56 vapier Exp $ -if [ ${#} -lt 1 ] ; then - echo "doenvd: at least one argument needed" +if [[ $# -lt 1 ]] ; then + echo "$0: at least one argument needed" 1>&2 exit 1 fi -tmp_INSDESTTREE="${INSDESTTREE}" -INSDESTTREE=/etc/env.d/ +exec \ +env \ +INSDESTTREE="/etc/env.d/" \ doins "$@" -INSDESTTREE="${tmp_INSDESTTREE}" -unset tmp_INSDESTTREE diff --git a/bin/doinitd b/bin/doinitd index 60dc6bc31..8aae1b383 100755 --- a/bin/doinitd +++ b/bin/doinitd @@ -3,13 +3,12 @@ # Distributed under the terms of the GNU General Public License v2 # $Id: /var/cvsroot/gentoo-src/portage/bin/doinitd,v 1.2.2.1 2005/01/13 04:51:56 vapier Exp $ -if [ ${#} -lt 1 ] ; then - echo "doinitd: at least one argument needed" +if [[ $# -lt 1 ]] ; then + echo "$0: at least one argument needed" 1>&2 exit 1 fi -tmp_EXEDESTTREE="${EXEDESTTREE}" -EXEDESTTREE=/etc/init.d/ +exec \ +env \ +EXEDESTTREE="/etc/init.d/" \ doexe "$@" -EXEDESTTREE="${tmp_EXEDESTTREE}" -unset tmp_EXEDESTTREE |