[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Printing [ OK ] on successful start or stop of a service?



On Sun, Dec 22, 2002 at 10:05:25PM +0700, 012950864 mobitel com kh wrote:
> 
> 
> Hi all:
> 
> This might sound a bit silly to ask; but I'm curious to know the code that does 
> the printing of [ OK ] on the 60th column when a service successfully starts or 
> stops. Well, I could check in the /etc/sysconfig/init to only know that it 
> would start printing [ OK ] at 60th column; but I could not find the exact code 
> that did the job of printing [ OK ].
> 
> Anyone, please?
> 
In /etc/init.d/functions is the code:
echo_success() {
  [ "$BOOTUP" = "color" ] && $MOVE_TO_COL
  echo -n "[  "
  [ "$BOOTUP" = "color" ] && $SETCOLOR_SUCCESS
  echo -n $"OK"
  [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
  echo -n "  ]"
  echo -ne "\r"
  return 0
}

echo_failure() {
  [ "$BOOTUP" = "color" ] && $MOVE_TO_COL
  echo -n "["
  [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE
  echo -n $"FAILED"
 [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
  echo -n "]"
  echo -ne "\r"
  return 1
}

-- 
-------------------------------------------
Aaron Konstam
Computer Science
Trinity University
715 Stadium Dr.
San Antonio, TX 78212-7200

telephone: (210)-999-7484
email:akonstam trinity edu





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]