LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 10-27-2006, 09:47 AM   #1
NiallC
Member
 
Registered: Feb 2003
Distribution: Suse 8.1
Posts: 102

Rep: Reputation: 15
Working with boot.local


Hello,

I recently added a line of code to my boot.local file which works perfectly, since it's a simple echo command.

However, what I'd also like to do within that file is something like the following:

#launch the asterisk console

./asterisk -r

# wait 10 seconds

wait 10

# type reload at the console prompt

echo reload

#hit the enter key to reload asterisk

enter


This is the functionality I require. I'm not sure if I'll need to put it into a script file and then run via symlink or whether I can put it in just as code.

I don't want to fool with it without asking first in case I mess something up.

Anyone have any input as the best way to do this?

Thanks!!

NiallC
 
Old 10-27-2006, 12:10 PM   #2
pAn1k
Member
 
Registered: Jun 2004
Location: Cala city
Distribution: Suse 10.0; Debian 5.0 (Lenny) Fluxbox
Posts: 240

Rep: Reputation: 30
I'm running on suse 10, but I just entered the command(s) that I wanted to run. Mine looks like this, I needed to add a resolution my bios does not support. Good luck!


#! /bin/sh
#
# Copyright (c) 2002 SuSE Linux AG Nuernberg, Germany. All rights reserved.
#
# Author: Werner Fink <werner@suse.de>, 1996
# Burchard Steinbild, 1996
#
# /etc/init.d/boot.local
#
# script with local commands to be executed from init on system startup
#
# Here you should add things, that should happen directly after booting
# before we're going to the first run level.
#

855resolution 5a 1280 768
 
Old 10-27-2006, 12:33 PM   #3
gkiagia
Member
 
Registered: Oct 2003
Location: Greece
Distribution: Debian sid
Posts: 248

Rep: Reputation: 30
What is asterisk? Does it require X? If it requires X then boot.local is definitely not what you want to edit.

Anyway, it is a very bad tactic to put "wait 10" in a boot script because your boot process will be automatically 10 seconds longer.

In addition, the syntax ./asterisk does not seem correct because you don't actually know if asterisk is in the working directory. (You don't even know the working directory). I suggest using full path.
 
Old 10-28-2006, 12:28 PM   #4
NiallC
Member
 
Registered: Feb 2003
Distribution: Suse 8.1
Posts: 102

Original Poster
Rep: Reputation: 15
Yes, I understand about the path, but is the rest of my syntax correct, would it actually work?
 
Old 10-28-2006, 02:48 PM   #5
pAn1k
Member
 
Registered: Jun 2004
Location: Cala city
Distribution: Suse 10.0; Debian 5.0 (Lenny) Fluxbox
Posts: 240

Rep: Reputation: 30
Well, you'll only know for sure if you try it!
 
Old 10-28-2006, 02:51 PM   #6
gkiagia
Member
 
Registered: Oct 2003
Location: Greece
Distribution: Debian sid
Posts: 248

Rep: Reputation: 30
It will probably work. There is nothing to be afraid of. Try it!
If it doesn't work, it will just throw some errors and continue.
 
  


Reply



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
cant boot suse bc of changed /etc/init.d/boot.local esyed Linux - General 5 09-24-2006 05:04 AM
Local logon not working rnuser Linux - Software 2 07-03-2006 06:22 AM
rc.local not working rahmed Slackware 4 04-17-2005 07:11 PM
boot hangs after running /etc/init.d/boot.local eddieb Linux - Newbie 2 07-18-2004 06:57 AM
Slackware 9, rc.local not working after reboot balton Slackware 2 08-08-2003 01:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 10:06 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