LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-04-2005, 08:58 PM   #1
Ook
Member
 
Registered: Apr 2004
Location: Hell, Arizona (July - 118 degrees)
Distribution: Slackware 14.2 soon to be Slackware 15
Posts: 597

Rep: Reputation: 116Reputation: 116
Can't get script to run on boot


I know this is a simple question...but...

I have in /etc/rc.d the file rc.mysql. It is there to start my Mysql server. It's properties are:

-rwxr-xr-x

I did chmod 755 rc.mysql
I did chmod +x rc.mysql

When I reboot, this script does not run and I have to start the mysql server manually, using this script. How can I get this script to run on startup? What am I missing?
 
Old 03-04-2005, 09:31 PM   #2
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
hi there

run
pkgtool
then go to

setup-->services--->choose ur service and ur done

regards
 
Old 03-04-2005, 09:36 PM   #3
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
By default mysql run script is called /etc/rc.d/rc.mysqld
If doesn't work with that name, just add a line to execute it in /etc/rc.d/rc.local
 
Old 03-04-2005, 10:07 PM   #4
Ook
Member
 
Registered: Apr 2004
Location: Hell, Arizona (July - 118 degrees)
Distribution: Slackware 14.2 soon to be Slackware 15
Posts: 597

Original Poster
Rep: Reputation: 116Reputation: 116
I'm not using the mysql server that came with, I have a different installation, and I use rc.mysql to start it. I disabled rc.mysqld to keep it from running. But I have another entry, rc.plasma-servers, that is setup the same way, and it, too, won't run at startup.

So, I put an entry in rc.local for these items, rebooted, and it worked!!! Woohoo!

Is putting an entry in rc.local the prefered way to get stuff to run at startup?

And here is a good one - I run the Windows Half-Life server via Wine. I do it because I run an OP4 server, and there are no linux binaries for OP4. The Windows OP4 server runs very well under Wine, I've been running like this for about a year now. In order to get it to work, I have to start KDE (startx), from KDE start the TotalCommander, a windows file manipulation utility, and from there start hlds.exe. I can't just start hlds.exe as it gives strange file not found errors. My question - how can I get kde to start automatically, and startup hlds.exe when I boot?
 
Old 03-04-2005, 10:46 PM   #5
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
rc.local is there exactly to put user commands, where running own commands is included
I'm sure you don't need to run totalcommander in order to run hlds, however, you need X running to get wine to run. Try: wine hlds.exe
(check wine's docs to get a detailed view on how to use it).
About KDE, well you can change initlevel to 4 in /etc/inittab.
That will get you in a graphical login manager, I would recommend you to configure KDM or GDM or XDM to login automatically or do some "cheating" like putting this in /etc/rc.d/rc.local:
Code:
su - youruser -c 'source /etc/profile; source /home/youruser/.bash_profile ; startx' &
That will launch X without having to login and in background

Last edited by gbonvehi; 03-04-2005 at 10:48 PM.
 
Old 03-04-2005, 11:49 PM   #6
Ook
Member
 
Registered: Apr 2004
Location: Hell, Arizona (July - 118 degrees)
Distribution: Slackware 14.2 soon to be Slackware 15
Posts: 597

Original Poster
Rep: Reputation: 116Reputation: 116
It has something to do with the "current" drive/directory when it starts. When I start from totalcommander, or norton commander, they both default to the fake "Z" drive (since the actual server files are not on the fake C windows drive, but are on a drive mapped as /fat-d).

If I try to start it from Konqueror, I get the following, and I'm not quite sure what it is trying to tell me. If I start it from TC or NC, it runs just fine.

fixme:font:WineEngCreateFontInstance just using first face for now
err:mmio:MMIO_ParseExtA No . in szFileName: ""
err:mmio:MMIO_ParseExtA No . in szFileName: "Z:\\fat-d\\hlserver\\gearbox\\"
wine: Unhandled exception (thread 0024), starting debugger...
WineDbg starting on pid 0x23
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x01408d68).
In 32 bit mode.
Register dump:
CS:0023 SS:002b DS:002b ES:002b FS:1007 GS:0000
EIP:01408d68 ESP:4068fb14 EBP:42ec0944 EFLAGS:00010246( - 00 -RIZP1)
EAX:00000000 EBX:42ec0900 ECX:00000001 EDX:42ec0944
ESI:415d5d30 EDI:42ecc310
Stack dump:
0x4068fb14: 42ecc7d8 415d5d30 00000000 42ec09b4
0x4068fb24: 00000100 00000000 00000000 00000000
0x4068fb34: 00000136 00000000 0140cba5 42ff1090
0x4068fb44: 0140cbb6 42ff1090 00000000 00000001
0x4068fb54: 00020044 42ff1090 00000000 00000000
0x4068fb64: 00000136 0000015e 42ea0fe7 00000001
0200: sel=1007 base=40016000 limit=00001f97 32-bit rw-
Backtrace:
=>1 0x01408d68 in hlds.exe -port 27014 (+0x8d68) (0x42ec0944)
2 0x42e9c550 in vgui2 (+0xc550) (0x42e9c230)
0x01408d68: movl 0x0(%eax),%edx
Wine-dbg>
 
Old 03-04-2005, 11:53 PM   #7
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
I don't undestand why you've to map the drive, can you just add it in your wine config as another drive?
If you can achieve to run the server without running TC or NC before, you'll be able to start the server on boot

Last edited by gbonvehi; 03-05-2005 at 12:00 AM.
 
Old 03-05-2005, 01:31 AM   #8
Ook
Member
 
Registered: Apr 2004
Location: Hell, Arizona (July - 118 degrees)
Distribution: Slackware 14.2 soon to be Slackware 15
Posts: 597

Original Poster
Rep: Reputation: 116Reputation: 116
I don't map the drive, I thought the Z drive was something Wine did? When I first fired up TC, it had the fake C drive, and the Z drive which appears to map to my linux root, ie what I when I do a cd / from a shell.
 
  


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
Script to run at boot robbow52 Debian 17 09-03-2004 09:04 PM
Getting a script to run at boot IMNOboist Linux - Software 2 05-10-2004 01:48 AM
Script won't run at boot bugsbunny Slackware - Installation 6 04-19-2004 04:26 PM
Run a script at boot, RH 7.2 dsheller Linux - Newbie 2 01-24-2004 09:12 PM
Can't get script to run on boot rickenbacherus Linux - General 5 08-21-2003 10:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:10 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration