SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
#
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.