LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-18-2004, 12:36 AM   #16
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Original Poster
Rep: Reputation: 50

Geekster-

Wow. Thanks for that last post. I'm going to be reading that over and over for the next couple of days. Seriously. I really am interested in this scripting stuff. I'm learning a lot more in this thread than I ever learned reading all of the scripting tutorial webpages. I'll make the changes to the script tomorrow after I re-read that a few times (I'm really not that bright late at night).

One problem that I am noticing, I don't like to reboot very often. Today, I have been rebooting a lot. It seems like this script doesn't actually start ddclient at boot time like I had hoped for. Is that right? I tried to use the other scripts in /etc/rc.d when I originally posted this. It seems that I have missed something. I thought I would see a message at bott time saying that ddclient was starting or at least saying that I needed to use the start|stop|restart|status. I am not seeing anything. Did I totally miss something?

Thanks in advance for your help.
 
Old 07-18-2004, 01:22 AM   #17
thegeekster
Member
 
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513

Rep: Reputation: 34
Have you told Slack to start the startup script to begin with?.................What I'm referring to is adding the appropriate entry to /etc/rc.d/rc.local, such as:
Code:
[ -x /etc/rc.d/rc.ddclient ] && /etc/rc.d/rc.ddclient start
In fact, you might want to put this reminder in your comments at the top of the script, under your instruction to make the script executable:
Code:
#
# Then add this entry in /etc/rc.d/rc.local:
#   [ -x /etc/rc.ddclient ] && /etc/rc.d/rc.ddclient start
#
 
Old 07-18-2004, 03:48 AM   #18
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Original Poster
Rep: Reputation: 50
No, Iguess I haven't. The solution I was trying to achieve was to make it like all of the other scripts in /etc/rc.d . Withh all of those script, all you have to do is make it executable and it will start whichever program at start time. All I have to d ofor the other files is

Code:
chmod +x /etc/rc.d/rc.name_of_file
I would have thought that I would have at leadt received the "usage $0 start|stop|restart|status" message. I don't appear to be receiving any messages.

Any ideas?
 
Old 07-18-2004, 05:02 AM   #19
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Have you these lines in your script ?
Code:
case "$1" in
	'start')
		ddclient_start   
		;;
	'stop')
		ddclient_stop
		;;
	'restart')
		ddclient_restart
		;;
	'status')
		ddclient_status
		;;
	*)
		echo "usage $0 start|stop|restart|status"
		;;
esac
 
Old 07-18-2004, 05:08 AM   #20
thegeekster
Member
 
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513

Rep: Reputation: 34
Quote:
...The solution I was trying to achieve was to make it like all of the other scripts in /etc/rc.d . Withh all of those script, all you have to do is make it executable and it will start whichever program at start time....
That's only part of the picture........................rc.S, rc.M, and rc.inet2 all have commands like I showed you, using the 'if [ -x ... ]" routines to start the other scripts in the /etc/rc.d directory............So you will also need to do the same for your startup script and that's what rc.local is for.......

Last edited by thegeekster; 07-18-2004 at 03:14 PM.
 
Old 08-10-2004, 10:19 PM   #21
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Original Poster
Rep: Reputation: 50
geekster-

OK, I think I get it now.

Now I am trying to learn how to build slackware packages, along with scripting. I think that I have everything right. I was wondering if anyone would care to check out the package that I made to see if I did everything right.

Here's a copy:

http://shilo.is-a-geek.com/slack/ddc...oarch-1seb.tgz

Just download it and install it with:

Code:
installpkg ddclient-3.6.3-noarch-1seb.tgz
This is the first package that I have ever made (excluding the ones that checkinstall makes for me), so I am really interested in knowing if I got it right.

The only things that were confusing were:

1) All of the tutorials on making packages say you need ./ . I don't know what that means. Do I need to add an extra directory?

2) I have included a script that modifies /etc/rc.d/rc.local . Is that bad? Should I modify a different file to get this thing running at boot time?

Thanks in advance for any help.
 
Old 08-11-2004, 03:49 AM   #22
thegeekster
Member
 
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513

Rep: Reputation: 34
Quote:
Originally posted by shilo
...This is the first package that I have ever made (excluding the ones that checkinstall makes for me), so I am really interested in knowing if I got it right.

The only things that were confusing were:

1) All of the tutorials on making packages say you need ./ . I don't know what that means. Do I need to add an extra directory?

2) I have included a script that modifies /etc/rc.d/rc.local . Is that bad? Should I modify a different file to get this thing running at boot time?

Thanks in advance for any help.
1) Not sure what you're referring to here. I've never read tutorials on making Slackware packages, but by studying the build scripts Patrick V. provides in the source directories of an installation CD or ftp site.........All that means ( ./ ) is a shorthand way of referring to the current working directory, instead of writing out the full path..............Also, in a Bourne shell (sh and bash), it is how you invoke a shell script in the current working directory. (You can't call a shell script directly from the current directory, you must include a path to the script or use "./scritpname".)........

2) The package looks alright to me............except.........I strongly advise against having any installation modifying the contents of any startup script in Slackware...........This is probably the only drawback of using a BSD-style startup routine, not able to modify the startup through an installation without the possibility of breaking something.................But we're Slackers, right, and prefer to do some things ourselves. If we wanted everything to be done automatically, we'd probably be using a different distro............

Some might even be annoyed by any installation making such changes without permission..............You have the necessary instructions in your rc.ddclient startup script for any Slacker to follow at the beginning of that startup script, so I would get rid of the doinst.sh script in your Slack pkg..........it's not needed........and just let them know to make the changes by hand..........

 
Old 08-11-2004, 12:00 PM   #23
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Original Poster
Rep: Reputation: 50
Thanks Geekster.

I know the ./ is the current directory. That's what confused me. I read here http://www.linuxpackages.net/howto.p...erfect+Package that ./ was a required directory or the package won't remove correctly. I used makepkg to make the package. I'm guessing that ./ is automatically included.

Thanks for the tip on not modifying rc.local. I'll fix up the package today per your suggestions.

Thanks again,
 
Old 08-11-2004, 03:07 PM   #24
thegeekster
Member
 
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513

Rep: Reputation: 34
Quote:
Originally posted by shilo
...I read here http://www.linuxpackages.net/howto.p...erfect+Package that ./ was a required directory or the package won't remove correctly. I used makepkg to make the package. I'm guessing that ./ is automatically included....
*scratches head*.............Heck if I know what they're talking about there..............I've never run across it in any of Patrick's slackware build scripts............If it's meant for the current working directory, Patrick uses the variable "CWD=`pwd`" in his build scripts..............I've built plenty of packages by hand and never had problems removing them.......

Glad to be of some help, too...................Building packages by hand is not really that hard, once you understand the basics, and gives you a greater degree of control in what options you want to build into the binary (as well as a better understanding of how things work together under the hood)..........Like any other new experience, it just seems scary, or hard, at first until you get your feet wet..........

 
  


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
ddclient not updating dyndns.org help boyd98 Linux - Networking 9 03-26-2005 01:59 PM
dyndns.org cojo Linux - Newbie 3 04-20-2003 02:10 PM
Is anyone using dyndns.org??? cojo Linux - Software 7 03-04-2003 11:09 PM
dyndns.org and mail exchangers d3funct Linux - Networking 1 10-10-2002 09:11 PM
dyndns.org d3funct Linux - Networking 1 04-25-2002 12:38 PM

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

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