Tille - I can see you, read those man pages!   Tille's Site

Explanation on the banner init script

This is the script:

#!/sbin/sh
# This script should be in the init.d directory.
# It prints a banner when your machine goes down and one when it reboots.

case "$1" in
'start')
	banner "Booting"
	;;
'stop')
	banner "Going down"
	;;
esac
exit 0

Copy it to your init.d directory. You need to be root to do this. Make sure that the script is executable:

prompt> chmod 754 banner

Now make the symbolic links in the runlevel 3 directory (/etc/rc.d/rc3.d on most Linux machines, /etc/rc3.d on Solaris):

prompt> pwd
/etc/rc.d/rc3.d

prompt> ln -s ../init.d/banner S99banner
prompt> ln -s ../init.d/banner K99banner

Upon rebooting your system with the init 6 command, you should see two banners:

 #####
#     #   ####      #    #    #   ####
#        #    #     #    ##   #  #    #
#  ####  #    #     #    # #  #  #
#     #  #    #     #    #  # #  #  ###
#     #  #    #     #    #   ##  #    #
 #####    ####      #    #    #   ####

######
#     #   ####   #    #  #    #
#     #  #    #  #    #  ##   #
#     #  #    #  #    #  # #  #
#     #  #    #  # ## #  #  # #
#     #  #    #  ##  ##  #   ##
######    ####   #    #  #    #

And this one when it reboots:

######
#     #   ####    ####    #####     #    #    #   ####
#     #  #    #  #    #     #       #    ##   #  #    #
######   #    #  #    #     #       #    # #  #  #
#     #  #    #  #    #     #       #    #  # #  #  ###
#     #  #    #  #    #     #       #    #   ##  #    #
######    ####    ####      #       #    #    #   ####

When deactivating start/stop scripts, rename them to use lower case s and k, e.g.

prompt> mv S99banner s99banner

This way, they are available for future reference and just deactivated instead of deleted.

Home
© 1995-2010 Machtelt Garrels - tille - Powered by vIm - Best viewed with your eyes - Validated by W3C - Last update 20100511