LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 12-21-2006, 04:05 PM   #1
byteframe
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 62

Rep: Reputation: 15
Pkgtool rc.d Scripts


Hey hey hey.

I made some cool rc.d scripts for my game servers, and I was wondering how to get them to show up in pkgtool (Setup -> Services). I just put them in /etc/rc.d and they dont show up there.

In case it matters, their chowned root:games. They work fine, but I was looking to have pkgtool enable (or disable) the servers via their scripts.

What's the word on this? Thanks.
 
Old 12-21-2006, 04:24 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
So where does the dog fit in? anyone would think you just did that for attention, and broke forum ettiquette rules in the process.
 
Old 12-21-2006, 05:16 PM   #3
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
/var/log/setup/setup.services

is the file you want.
 
Old 12-21-2006, 06:28 PM   #4
folkenfanel
Member
 
Registered: Sep 2004
Location: formerly Fanelia and Zaibach
Distribution: Slackware-current !
Posts: 342

Rep: Reputation: 59
Unhappy if the dog dies it would be your fault (at least in part)

Hi

I think you meant that if you don't solve that problem then you would be so busy finding the solution that you would forget about your dog and so put its life in risk.

Not funny, to be honest. I think something like that could happen to me if I was living alone...

Shame on me. That's why I have had no pets for years.

How good computers don't need food!
 
Old 12-21-2006, 06:30 PM   #5
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
I have edited the thread title to stop the off-topicy goodness. Back on track we go......
 
Old 12-21-2006, 10:57 PM   #6
byteframe
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 62

Original Poster
Rep: Reputation: 15
You crazy forum nazis!

Anyways, how do you edit this file? I added this to it in what is probably the appriorated place...

Code:
if [ -r etc/rc.d/rc.ut2004ded]; then
  if [ -x etc/rc.d/rc.ut2004ded]; then
    RC_UT2004DED=on
  else
    RC_UT2004DED=off
  fi
  cat << EOF >> $TMP/tmpscript
    "rc.ut2004ded" "The UT2004 game server" $RC_UT2004DED"The UT2004 server allows your machine to host multiple Unreal Tournament 2004 games." \\
EOF
fi
ill look it over some more, do I have to run smoe command or something? I can't reboot my machine or Ill lose and uptime contest AND MY DOG WILL BE PROCESSED INTO PIG SLOP!
 
Old 12-22-2006, 12:11 AM   #7
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
O.k... That's fine but you missed the for loop at the bottom. Add your script name there and you will have to add a section to either rc.M or rc.local to actually fire the script up. I'm guessing you already did that but one can't be sure. Slackware isn't rocket science.
 
Old 12-22-2006, 12:45 AM   #8
byteframe
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 62

Original Poster
Rep: Reputation: 15
Damn, didnt work, kinda looked like it would have, heres what it looks like now in case its done wrong.

Code:
for service in rc.atalk rc.bind rc.cups rc.dnsmasq rc.httpd rc.inetd rc.ip_forward rc.lprng rc.mysqld rc.pcmcia rc.rpc rc.samba rc.saslauthd rc.scanluns rc.sendmail rc.syslog rc.sshd rc.ut2004ded ; do
The location of this file seem weird (/var/log ???)
 
Old 12-22-2006, 01:22 AM   #9
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
Piter Punk has a nice tool for turning services on and off called initcfg. You can get a copy here:
http://distro.ibiblio.org/pub/linux/...3-noarch-4.tgz
 
Old 12-22-2006, 01:36 AM   #10
byteframe
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 62

Original Poster
Rep: Reputation: 15
I dont know, I dont trust a guy named Piter Punk, this is slackware compatible?
 
Old 12-22-2006, 01:37 AM   #11
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
Quote:
Originally Posted by byteframe
You crazy forum nazis!

Anyways, how do you edit this file? I added this to it in what is probably the appriorated place...

Code:
if [ -r etc/rc.d/rc.ut2004ded]; then
  if [ -x etc/rc.d/rc.ut2004ded]; then
    RC_UT2004DED=on
  else
    RC_UT2004DED=off
  fi
  cat << EOF >> $TMP/tmpscript
    "rc.ut2004ded" "The UT2004 game server" $RC_UT2004DED"The UT2004 server allows your machine to host multiple Unreal Tournament 2004 games." \\
EOF
fi
ill look it over some more, do I have to run smoe command or something? I can't reboot my machine or Ill lose and uptime contest AND MY DOG WILL BE PROCESSED INTO PIG SLOP!
Your formatting is off there. Try this:

Code:
if [ -r etc/rc.d/rc.ut2004ded ]; then
  if [ -x etc/rc.d/rc.ut2004ded ]; then
    RC_UT2004DED=on
  else
    RC_UT2004DED=off
  fi
  cat << EOF >> $TMP/tmpscript
    "rc.ut2004ded" "The UT2004 game server" $RC_UT2004DED "The UT2004 server allows your machine to host multiple Unreal Tournament 2004 games." \\
EOF
fi
 
Old 12-22-2006, 01:41 AM   #12
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
And Piter Punk makes many contributions to Slackware on an "official" level... Why would you not trust someone soley based on their name?
 
Old 12-22-2006, 01:49 AM   #13
byteframe
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 62

Original Poster
Rep: Reputation: 15
So whitespace like that makes a differance for bash scripting?
 
Old 12-22-2006, 01:54 AM   #14
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
Uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh....................................................

yea.
 
Old 12-22-2006, 01:57 AM   #15
byteframe
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 62

Original Poster
Rep: Reputation: 15
uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh.... its working now....uhhhhhhhhhhh........thanks............
 
  


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
using pkgtool steveel Slackware - Installation 3 02-22-2006 01:47 PM
VPN: Debian Scripts -> Mandriva 2006 Scripts Undefined Mandriva 0 11-30-2005 12:10 PM
pkgtool does nothing?! alienDog Slackware 8 10-31-2004 05:11 PM
Pkgtool Corallis Slackware 6 09-01-2004 11:49 PM
pkgtool sio Linux - General 0 07-30-2003 12:47 PM

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

All times are GMT -5. The time now is 04:33 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
Open Source Consulting | Domain Registration