1. initscript-telnetd.bb
  2. DESCRIPTION = "Initscripts for telnetd"
  3. LICENSE = "MIT"
  4. PR ="r2"
  5. SRC_URI = "file://telnetd"
  6. INITSCRIPT_NAME = "telnetd"
  7. INITSCRIPT_PARAMS = "defaults 10"
  8. inherit update-rc.d
  9. do_install () {
  10. install -d ${D}${sysconfdir}/init.d/
  11. install -c -m 755 ${WORKDIR}/telnetd ${D}${sysconfdir}/init.d/telnetd
  12. }
  13. #! /bin/sh
  14. telnetd=/usr/sbin/telnetd
  15. test -x "$telnetd" || exit 0
  16. case "$1" in
  17. start)
  18. echo -n "Starting telnet daemon"
  19. start-stop-daemon --start --quiet --exec $telnetd
  20. echo "."
  21. ;;
  22. stop)
  23. echo -n "Stopping telnet daemon"
  24. start-stop-daemon --stop --quiet --pidfile /var/run/telnetd.pid
  25. echo "."
  26. ;;
  27. *)
  28. echo "Usage: /etc/init.d/telnetd {start|stop}"
  29. exit 1
  30. esac
  31. exit 0

Simole telnetd initscript recipe for busybox

Comments powered by Disqus