LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-03-2008, 09:49 AM   #1
netwrkengeer
LQ Newbie
 
Registered: Aug 2008
Posts: 6

Rep: Reputation: 0
Symlink will not execute Shell Script in /etc/rc2.d


I need to start an application on boot for us on dumb terminals.

I have created the following script called "S99unform.sh" to start an application called unform. the script looks like this.

###########################
#!/bin/bash

/usr/bin/uf71d start

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

I saved this script in /usr/unform directory.

I can execute the application from the command line with the following command.
./usr/bin/uf71d start

I can execute my shell script with the following ./usr/unform/S99unform.sh

Then I created a symlink to S99unform.sh in /etc/rc2.d
(i.e. ln -s /usr/unform/S99unform.sh S99unform)

I thought this would cause the application to startup on boot but it did not, what am I doing wrong?

Thanks for your help.
 
Old 08-03-2008, 10:50 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
If you want to use SysV initscripts your script should conform to specs and you should use the appropriate tools for that. If you can't or don't want to do that you can add your script to any of /etc/rc.d/rc.local (preferred), the system crontab as an @reboot job or /etc/inittab depending on your needs.
 
Old 08-03-2008, 12:06 PM   #3
netwrkengeer
LQ Newbie
 
Registered: Aug 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Inittab would probably work. I should use chkconfig to add it correct? would it accept my script or do I need a bourne shell script to run it?
 
Old 08-03-2008, 02:12 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
In your case 'echo "/usr/bin/uf71d start" >> /etc/rc.d/rc.local' should do. By default rc.local is started in runlevels three to five [EDIT]but you can link rc.local to runlevel two like the other symlinks even though thats probably non-standard[/EDIT]. No extra whatever needed to start the daemon (provided you got your licensing right). With respect to the licensing part: as far as I can see UnForm is a commercial product and not subject to any OSS-compatible License (please correct me if I'm wrong) and in my humble and personal opinion the vendor (who also bills for license resets) should be your first port of call with respect to support for this product.

Last edited by unSpawn; 08-03-2008 at 02:20 PM.
 
Old 08-03-2008, 03:35 PM   #5
netwrkengeer
LQ Newbie
 
Registered: Aug 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Your probably right, I should contact the vendor, I just didn't want to wait till monday to get this server running.

Thanks for your help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot execute script file from shell shahrahulb Linux - General 4 03-04-2008 07:02 AM
How to execute a shell script by clicking on it? foo1234 Linux - Newbie 12 04-18-2007 12:18 AM
execute shell script in KDE Lotharster Linux - Newbie 1 11-21-2005 06:02 PM
shell script won't execute brandnewbie Linux - Newbie 7 08-10-2004 01:30 PM
shell script how to execute x2000koh Programming 6 07-29-2003 04:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration