« VIM freebies | Main | A Call to Action! »
October 24, 2005
Keep your pants on
Understanding the initialization process of your Linux distro is quite important, as the boot sequence is where the majority of problems occur. It's also very useful to know and understand how to create or modify a System-V init script for dealing with starting and stopping of services.
For this reason, I've taken the Pants script originally written by one Conrad Parker and updated and improved it.
I've updated the script to be the 'best practice' on a Red Hat Enterprise Linux or Fedora Core system running RHEL3/4 or FC3/4 respectively.
Here are some of the various improvements I've made:
- Comments -- I've added various comments describing the functionality of each piece.
The script is now over 25% comments - Functionalize -- The original script as written by Conrad calls itself for restart for the restart function.
My script uses bash subroutines for increased performance / decreased resources. - SYS-V includes -- This pants script makes use of the
/etc/sysconfig/directory to store an included config file which houses the tunable parameters. - Real-World example -- Instead of just going through the actions of running a SYS-V script we start and stop an actual network daemon.
- Distrofy -- Made use of the Red Hat specific sysvinit included functions file.
/etc/init.d/functions
This includes the daemon, action, status, and killproc functions. - Packagfacation -- I've created a RPM package which includes the script, config files, .spec file, and everything one would need to recreate this package elsewhere.
There are various other small improvements that I may have missed, if so I'll update this page later listing them.
NEWS!
Pants script just been released. Find the rpm package here.Find the spec file here.
And the script itself here.
Posted by sjansen at October 24, 2005 8:38 PM