summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/newconfd10
-rwxr-xr-xbin/newenvd10
-rwxr-xr-xbin/newinitd10
3 files changed, 15 insertions, 15 deletions
diff --git a/bin/newconfd b/bin/newconfd
index cb30ec6e2..63a38bb78 100755
--- a/bin/newconfd
+++ b/bin/newconfd
@@ -3,11 +3,11 @@
# Distributed under the terms of the GNU General Public License v2
# $Id: /var/cvsroot/gentoo-src/portage/bin/newconfd,v 1.2 2004/10/04 13:56:50 vapier Exp $
-if [ -z "${T}" ] || [ -z "${2}" ] ; then
- echo "Nothing defined to do."
+if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
+ echo "$0: Need two arguments, old file and new file" 1>&2
exit 1
fi
-rm -rf "${T}/${2}"
-cp "${1}" "${T}/${2}"
-doconfd "${T}/${2}"
+rm -rf "${T}/${2}" && \
+cp -f "${1}" "${T}/${2}" && \
+exec doconfd "${T}/${2}"
diff --git a/bin/newenvd b/bin/newenvd
index ced17098d..07bbec644 100755
--- a/bin/newenvd
+++ b/bin/newenvd
@@ -3,11 +3,11 @@
# Distributed under the terms of the GNU General Public License v2
# $Id: /var/cvsroot/gentoo-src/portage/bin/newenvd,v 1.2 2004/10/04 13:56:50 vapier Exp $
-if [ -z "${T}" ] || [ -z "${2}" ] ; then
- echo "Nothing defined to do."
+if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
+ echo "$0: Need two arguments, old file and new file" 1>&2
exit 1
fi
-rm -rf "${T}/${2}"
-cp "${1}" "${T}/${2}"
-doenvd "${T}/${2}"
+rm -rf "${T}/${2}" && \
+cp -f "${1}" "${T}/${2}" && \
+exec doenvd "${T}/${2}"
diff --git a/bin/newinitd b/bin/newinitd
index c6513460b..50a4d54d7 100755
--- a/bin/newinitd
+++ b/bin/newinitd
@@ -3,11 +3,11 @@
# Distributed under the terms of the GNU General Public License v2
# $Id: /var/cvsroot/gentoo-src/portage/bin/newinitd,v 1.2 2004/10/04 13:56:50 vapier Exp $
-if [ -z "${T}" ] || [ -z "${2}" ] ; then
- echo "Nothing defined to do."
+if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
+ echo "$0: Need two arguments, old file and new file" 1>&2
exit 1
fi
-rm -rf "${T}/${2}"
-cp "${1}" "${T}/${2}"
-doinitd "${T}/${2}"
+rm -rf "${T}/${2}" && \
+cp -f "${1}" "${T}/${2}" && \
+exec doinitd "${T}/${2}"