touchup code so we handle errors better
authorMike Frysinger <vapier@gentoo.org>
Sat, 4 Feb 2006 05:28:59 +0000 (05:28 -0000)
committerMike Frysinger <vapier@gentoo.org>
Sat, 4 Feb 2006 05:28:59 +0000 (05:28 -0000)
svn path=/main/trunk/; revision=2652

bin/doconfd
bin/doenvd
bin/doinitd

index e48321637f02a8748ad488fdf7ea61f1e9648183..e9ea1fdfbf9e9c737aae644ceef10d89d50da1f6 100755 (executable)
@@ -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
index 01197a07dfd3420dec79a8611d39c0998367acc6..5232ed908b88345a192028485385b7689ce97c5d 100755 (executable)
@@ -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
index 60dc6bc31518df2cad1713ef3edd0b9b16974190..8aae1b383925f3a456a2326d6e34494d5a1b4e72 100755 (executable)
@@ -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