[arch-projects] [initscripts] Patch to fix FS#24879
Seblu
seblu at seblu.net
Sun Jun 26 16:39:26 EDT 2011
On Sun, Jun 26, 2011 at 9:28 PM, Jacob Okamoto <jacobokamoto at gmail.com> wrote:
> Patch to fix FS#24879, clearing terminal text formatting after nonexistent daemon script failure in rc.d.
>
> Signed-off-by: Jacob Okamoto <jacobokamoto at gmail.com>
> ---
> rc.d | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/rc.d b/rc.d
> index 6d9a9f7..58dcfdc 100755
> --- a/rc.d
> +++ b/rc.d
> @@ -69,8 +69,9 @@ case $1 in
> if [[ -x "/etc/rc.d/$i" ]]; then
> env -i "${ENV[@]}" "/etc/rc.d/$i" "$action"
> else
> - printf "${C_OTHER}:: ${C_FAIL}Error: ${C_DONE}Daemon script $i does not exist.\n"
> + printf "${C_OTHER}:: ${C_FAIL}Error: ${C_DONE}Daemon script $i does not exist."
> fi
> + printf "${C_CLEAR}\n"
> (( ret += !! $? )) # clamp exit value to 0/1
> done
I did not tested your patch but
Output of
env -i "${ENV[@]}" "/etc/rc.d/$i" "$action"
let term is a coherent state end with no need of \n !
printf "${C_OTHER}:: ${C_FAIL}Error: ${C_DONE}Daemon script $i does not exist."
wait a term to be cleared and need a \n
Why do not do something like this ?
printf "${C_OTHER}:: ${C_FAIL}Error: ${C_DONE}Daemon script $i does
not exist.$'{C_CLEAR}\n"
--
Sébastien Luttringer
www.seblu.net
More information about the arch-projects
mailing list