I have an assignment where i have to show a message when entering runlevel 3 and when exiting runlevel 3. I have created the script in init.d:

case "$1" in
  start)
    echo "Welcome to RC3"
    ;;
  stop)
    echo "RC3 says goodbye"
    ;;
esac

exit 0

And created a symbolic link in rc3.d.

however: when changing runlevel the message is not shown

asked 21 Jun '12, 19:21

Peter%20Elzinga's gravatar image

Peter Elzinga
111
accept rate: 0%




The message may not be directed to the right console. Double-check that the script is actually being run; you could try redirecting the message to a file:

echo "Welcome to RC3" >/tmp/messagetest

If that works, you'll need to redirect the message to the proper console, e.g.

echo "Welcome to RC3" >/dev/console
link

answered 24 Nov '12, 16:56

KJ4TIP's gravatar image

KJ4TIP
464
accept rate: 12%

edited 24 Nov '12, 16:58

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×90
×24

Asked: 21 Jun '12, 19:21

Seen: 5,275 times

Last updated: 24 Nov '12, 16:58

powered by OSQA