Go Back   openSUSE Forums > Archives > SF Archives > ARCHIVES - Programming & Scripting
Forums FAQ Members List Search Today's Posts Mark Forums Read


ARCHIVES - Programming & Scripting A place to discuss website design, programming, shell scripts, etc

 
Page 2 of 2 1 2
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 15-Apr-2007, 18:14
ken_yap
Guest
 
Posts: n/a
Default

Quote:
What I mean is about the Suse philosophy behind configuration. Everything should be X oriented through whatever tool, they almost do not document the way via command line, simply because they think users don't want to handle command line.
[/b]
Nothing has been lost from the command line, you just have to read the documentation and do it the way SUSE intended. In fact in some ways the init scripts of SUSE are more sophisticated because they work out the correct order using the dependency information at the top of the file.

And now with rug and zypper, you can also install and update from the command line. Very useful for those of us who run servers.
  #12 (permalink)  
Old 18-Apr-2007, 20:40
robman
Guest
 
Posts: n/a
Default

Quote:
I stand corrected. I offer the following from the SuSE Admin Guide:

13.4.1.
To create a custom init script for a given program or service, use the file /etc/init.d/skeleton as a template. Save a copy of this file under the new name and edit the relevant program and file names, paths, and other details as needed. You may also need to enhance the script with your own parts, so the correct actions are triggered by the init procedure.

The INIT INFO block at the top is a required part of the script and should be edited:
Example13.1.A Minimal INIT INFO Block
### BEGIN INIT INFO
# Provides: FOO
# Required-Start: $syslog $remote_fs
# Required-Stop: $syslog $remote_fs
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: Start FOO to allow XY and provide YZ
### END INIT INFO

In the first line of the INFO block, after Provides:, specify the name of the program or service controlled by this init script. In the Required-Start: and Required-Stop: lines, specify all services that need to be started or stopped, respectively, before the service itself is started or stopped. This information is used later to generate the numbering of script names, as found in the runlevel directories. Under Default-Start: and Default-Stop:, specify the runlevels in which the service should automatically be started or stopped. Finally, under Description:, provide a short description of the service in question.

To create the links from /etc/init.d/ to the corresponding runlevel directories (/etc/init.d/rc?.d/), enter the command insserv <new-script-name>. The insserv program evaluates the INIT INFO header to create the necessary links for start and stop scripts in the runlevel directories (/etc/init.d/rc?.d/). The program also takes care of the correct start and stop order for each runlevel by including the necessary numbers in the names of these links. If you prefer a graphical tool to create such links, use the runlevel editor provided by YaST, as described in Section 13.5. ?The YaST Runlevel Editor?.
[/b]


Anybody know how to add this command into the skeleton and get it to run properly?

/etc/dynubasic/dynubasic < /etc/dynubasic/basic.cfg

You can do this in rc.local with no sweat.
  #13 (permalink)  
Old 24-Apr-2007, 20:26
robman
Guest
 
Posts: n/a
Default

Quote:
Anybody know how to add this command into the skeleton and get it to run properly?

/etc/dynubasic/dynubasic < /etc/dynubasic/basic.cfg

You can do this in rc.local with no sweat.
[/b]
Well since there is no rc.local and I had the source I rewrote dynubasic to read the configuration file internally. I changed basic.c and I can send you the changes if you want. It still doesn't work right, maybe because it does fork(). I get some error from the System runlevel thing saying it's returning nil after a long long start. But if you refresh it, you can see it did start. So I made progress.
 
Page 2 of 2 1 2

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2