mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-01-19 13:37:39 +00:00
added print_error_msg to rcS script
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@878 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
2dff95bc2c
commit
2a97a7cadf
@ -44,6 +44,7 @@ print_error_msg()
|
|||||||
echo
|
echo
|
||||||
echo "Press a key to continue..."
|
echo "Press a key to continue..."
|
||||||
read
|
read
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -14,6 +14,30 @@ command:</para>
|
|||||||
# used here
|
# 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
|
runlevel=S
|
||||||
prevlevel=N
|
prevlevel=N
|
||||||
umask 022
|
umask 022
|
||||||
@ -29,6 +53,12 @@ for i in /etc/rcS.d/S*
|
|||||||
do
|
do
|
||||||
[ ! -f "$i" ] && continue;
|
[ ! -f "$i" ] && continue;
|
||||||
$i start
|
$i start
|
||||||
|
error_value=$?
|
||||||
|
|
||||||
|
if [ $error_value != 0 ]
|
||||||
|
then
|
||||||
|
print_error_msg
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# End /etc/init.d/rcS
|
# End /etc/init.d/rcS
|
||||||
|
Loading…
Reference in New Issue
Block a user