LinuxQuestions.org
Visit Jeremy's Blog.
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 03-21-2004, 07:44 AM   #1
gkhewitt
Member
 
Registered: Jun 2003
Distribution: ClarkConnect (RH9)
Posts: 41

Rep: Reputation: 15
Problems with starting at boottime


Hi there,

Each time my server boots I need to execute 4 programs before things are working properly again. I've tried adding these to the rc.local file and also tried creating a rc.d/init.d startup file but to no avail.

Each time I try and run one of these, I get the error:


: bad interpreter: No such file or directory

I would prefer (for ease of use) this to work with rc.local. I have chmodded it to 755, chowned it to root, to no avail. The first line reads

#!/bin/sh

If this is of any help....


Can anyone shed any light??

Cheers
 
Old 03-21-2004, 09:04 AM   #2
lokee
Member
 
Registered: Feb 2003
Distribution: Gentoo
Posts: 381

Rep: Reputation: 30
Are you sure you have sh? Maybe you use only bash?
 
Old 03-21-2004, 09:32 AM   #3
gkhewitt
Member
 
Registered: Jun 2003
Distribution: ClarkConnect (RH9)
Posts: 41

Original Poster
Rep: Reputation: 15
If I type sh at the CLI (bash) it comes up with the prompt:


sh-2.05b#


Then if I try running rc.local from that prompt it comes up with the same bad interpreter error. Could it be anything to do with the fact I created the file in notepad in Windows then copied it over via samba? I still chowned and chmodded it but could it be an issue?

Cheers
 
Old 03-21-2004, 10:28 AM   #4
andrewlkho
Member
 
Registered: Jul 2003
Location: London
Posts: 548

Rep: Reputation: 30
It sounds like that's the issues. Windows uses '\n\r' as its line ending, whereas *nix uses '\n' as a line ending. Therefore, the line endings are going to be messed up [try cat-ing the file, and you'll see what I mean]. This is why your linux computer thinks that you don't have the interpreter, because the first line is garbled. To solve this, you should create the file in linux, so that it'll have the correct line endings [or convert it from DOS format to UNIX format].
 
Old 03-21-2004, 11:18 AM   #5
gkhewitt
Member
 
Registered: Jun 2003
Distribution: ClarkConnect (RH9)
Posts: 41

Original Poster
Rep: Reputation: 15
Brilliant, that sorted it.

Thanks
 
  


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
problems with smbfs mount-point in /etc/fstab - "mount -a" works, but not at boottime MarkSide Linux - Software 4 11-20-2005 04:30 PM
where I have to put an entry of modprobe that its available at boottime Paul7 Linux - General 2 11-02-2005 12:11 PM
Start game server at boottime. jp_ Slackware 8 10-10-2005 02:51 PM
what/where is the file that control nic device on/off at boottime? hkl8324 Fedora 2 06-14-2005 09:44 AM
running script at boottime Ratclaws Linux - General 2 10-24-2001 07:05 PM


All times are GMT -5. The time now is 10:02 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration