BASH   30
Bootscript for powernowd
Guest on 4th February 2023 01:34:05 PM


  1. cat >>/etc/rc.d/init.d/powernowd << EOF
  2. #!/bin/sh
  3.  
  4. . /etc/sysconfig/rc
  5. . ${rc_functions}
  6.  
  7. case "${1}" in
  8.         start)
  9.                 boot_mesg "Starting powernowd"
  10.                 loadproc /sbin/powernowd
  11.                 ;;
  12.         status)
  13.                 boot_mesg "Starting powernowd"
  14.                 statusproc /sbin/powernowd
  15.                 ;;
  16.         stop)
  17.                 boot_mesg "Starting powernowd"
  18.                 killproc /sbin/powernowd
  19.                 ;;
  20.         *)
  21.                 echo "Usage: ${0} {start|status|stop}"
  22.                 exit 1
  23.                 ;;
  24. esac
  25. EOF
  26.  
  27. chmod 754 /etc/rc.d/init.d/powernowd
  28.  
  29. ln -s ../init.d/powernowd /etc/rc.d/rcsysinit.d/S45powernowd
  30. ln -s ../init.d/powernowd /etc/rc.d/rc0.d/K45powernowd
  31. ln -s ../init.d/powernowd /etc/rc.d/rc6.d/K45powernowd

Raw Paste

Login or Register to edit or fork this paste. It's free.