aboutsummaryrefslogtreecommitdiffstats
path: root/chapter07/rcS.xml
diff options
context:
space:
mode:
authorGerard Beekmans <gerard@linuxfromscratch.org>2001-08-01 00:02:28 +0000
committerGerard Beekmans <gerard@linuxfromscratch.org>2001-08-01 00:02:28 +0000
commit2a97a7cadf6b56e09f20a69907cddd9145dcccf6 (patch)
tree15c459320b82242f331598a4b2168bb52a367e0e /chapter07/rcS.xml
parent2dff95bc2c82c15c169c976ce09d40bbe0663ed9 (diff)
added print_error_msg to rcS script
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@878 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter07/rcS.xml')
-rw-r--r--chapter07/rcS.xml30
1 files changed, 30 insertions, 0 deletions
diff --git a/chapter07/rcS.xml b/chapter07/rcS.xml
index 0014d77b3..fde87d99c 100644
--- a/chapter07/rcS.xml
+++ b/chapter07/rcS.xml
@@ -14,6 +14,30 @@ command:</para>
# used here
#
+source /etc/init.d/functions
+
+print_error_msg()
+{
+
+ echo
+ $FAILURE
+ echo -n "You should not read this error message. It means "
+ echo "that an unforeseen error "
+ echo -n "took place and subscript $i exited with "
+ echo "a return value "
+ echo -n "of $error_value for an unknown reason. If you're able "
+ echo "to trace this error down "
+ echo -n "to a bug in one of the files provided by this book, "
+ echo "please be so kind to "
+ echo -n "inform us at lfs-discuss@linuxfromscratch.org"
+ $NORMAL
+ echo
+ echo
+ echo "Press a key to continue..."
+ read
+
+}
+
runlevel=S
prevlevel=N
umask 022
@@ -29,6 +53,12 @@ for i in /etc/rcS.d/S*
do
[ ! -f "$i" ] &amp;&amp; continue;
$i start
+ error_value=$?
+
+ if [ $error_value != 0 ]
+ then
+ print_error_msg
+ fi
done
# End /etc/init.d/rcS