SlackwareThis Forum is for the discussion of Slackware 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.
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?
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:
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.
...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.
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.
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?
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..........
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.
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..........
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.