Author: dj
Date: 2005-09-10 22:33:41 -0600 (Sat, 10 Sep 2005)
New Revision: 6829
Modified:
trunk/bootscripts/CHANGELOG
trunk/bootscripts/contrib/enhanced/init.d/functions
trunk/bootscripts/lfs/init.d/functions
Log:
fixed killproc not_running and 'print_status warning' output
Modified: trunk/bootscripts/CHANGELOG
===================================================================
--- trunk/bootscripts/CHANGELOG 2005-09-11 02:45:21 UTC (rev 6828)
+++ trunk/bootscripts/CHANGELOG 2005-09-11 04:33:41 UTC (rev 6829)
@@ -1,3 +1,10 @@
+n/a - September 10, 2005
+ * Changed killproc to use warning if not running
+ * Changed 'print_status warning' to use old style output
+ * Fixed display error with LSB init-functions script
+ * Made above killproc/print_status changes in enhanced
+ bootscripts. (DJ Lucas)
+
n/a - August 14, 2005
* Added -s flag to pidofproc() for backwards
compatibility (DJ Lucas)
Modified: trunk/bootscripts/contrib/enhanced/init.d/functions
===================================================================
--- trunk/bootscripts/contrib/enhanced/init.d/functions 2005-09-11 02:45:21 UTC
(rev 6828)
+++ trunk/bootscripts/contrib/enhanced/init.d/functions 2005-09-11 04:33:41 UTC
(rev 6829)
@@ -312,9 +312,6 @@
return 1
fi
- boot_mesg_flush
- echo_warning
-
case "${1}" in
success)
@@ -326,14 +323,20 @@
# may call it this way.
case "${2}" in
running)
+ echo -e -n "${CURS_UP}"
+ echo -e -n "\\033[${CUR_LENGTH}G "
boot_mesg "Already running." ${WARNING}
echo_warning
;;
not_running)
+ echo -e -n "${CURS_UP}"
+ echo -e -n "\\033[${CUR_LENGTH}G "
boot_mesg "Not running." ${WARNING}
echo_warning
;;
not_available)
+ echo -e -n "${CURS_UP}"
+ echo -e -n "\\033[${CUR_LENGTH}G "
boot_mesg "Not available." ${WARNING}
echo_warning
;;
@@ -676,6 +679,7 @@
pidofproc -s -p "${pidfile}" "${1}"
fi
+ if [ -n "${pidlist}" ]; then
for pid in ${pidlist}
do
kill -${killsig:-TERM} ${pid} 2>/dev/null
@@ -716,8 +720,11 @@
fi
fi
- evaluate_retval # This is "Probably" not LSB compliant, but required to
be compatible with older bootscripts
+ evaluate_retval
+ else
+ print_status warning not_running
+ fi
}
Modified: trunk/bootscripts/lfs/init.d/functions
===================================================================
--- trunk/bootscripts/lfs/init.d/functions 2005-09-11 02:45:21 UTC (rev
6828)
+++ trunk/bootscripts/lfs/init.d/functions 2005-09-11 04:33:41 UTC (rev
6829)
@@ -306,9 +306,6 @@
return 1
fi
- boot_mesg_flush
- echo_warning
-
case "${1}" in
success)
@@ -320,14 +317,20 @@
# may call it this way.
case "${2}" in
running)
+ echo -e -n "${CURS_UP}"
+ echo -e -n "\\033[${CUR_LENGTH}G "
boot_mesg "Already running." ${WARNING}
echo_warning
;;
not_running)
+ echo -e -n "${CURS_UP}"
+ echo -e -n "\\033[${CUR_LENGTH}G "
boot_mesg "Not running." ${WARNING}
echo_warning
;;
not_available)
+ echo -e -n "${CURS_UP}"
+ echo -e -n "\\033[${CUR_LENGTH}G "
boot_mesg "Not available." ${WARNING}
echo_warning
;;
@@ -670,6 +673,7 @@
pidofproc -s -p "${pidfile}" "${1}"
fi
+ if [ -n "${pidlist}" ]; then
for pid in ${pidlist}
do
kill -${killsig:-TERM} ${pid} 2>/dev/null
@@ -710,8 +714,11 @@
fi
fi
- evaluate_retval # This is "Probably" not LSB compliant, but required to
be compatible with older bootscripts
+ evaluate_retval
+ else
+ print_status warning not_running
+ fi
}
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page