Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Fedora Start-up Scripts

// description of your code here

   1  
   2  have a fedora core box which needs to run different scripts on startup to connect to other boxes on the network.
   3  
   4  After a bit of fiddling around, I found what appears to be the best solution for me, using ntsysv and init.d. Here's how it's done;
   5  
   6  1.) make a new file in the /etc/init.d/ directory
   7  2.) add your script to this file with the following lines at the top;
   8  #!/bin/bash
   9  # chkconfig: 345 85 15
  10  # description: of your file
  11  
  12  3.) enter this in the shell;
  13  chkconfig --add startup_filename
  14  
  15  4.) type ntsysv - your startup script should now be in the list, checked and ready for action!

You need to create an account or log in to post comments to this site.


Click here to browse all 5545 code snippets