I need to write a a script that inserts a line into startup script of linux machines. I am doing this as part of installation of a software developed by me. During installation, I need to make sure that the newly installed program is part of startup script, so that it gets started automatically when the system boots. This should happen, regardless of linux version or flavour. In red hat, I used to write a script to insert a line into /etc/rc.d/rc.local and it works fine.
Now, in Suse enterprise, rc.d folder is not there in etc folder. Instead of that, rc.d shortcut is available, which points to rc.init folder. In this folder again, rc.local file is not there. Instead, notmal rc.0, rc.1 rc.2 etc are available.
Now, what is the best method to make sure that my program is whenever linux starts up? In which script should I insert lines to call my executable during startup? If rc.d and rc.local are not available in the linux version, should I create the folders and files? (One site says I can create the folder/file)