From: Joe P. <joe...@sn...> - 2000-12-21 04:25:04
|
On Tuesday 19 December 2000 03:07, Timothy Lee wrote: >Hiya, all. >I'm using hpoj with RedHat 6.2. Instead of activating ptal-printd from >rc.local, I thought it'd be easier to have a separate init script for it.? >So I've written up the following script to load ptal-printd as a daemon: <...> Timothy: I set up your script on my RH6.1 machine to start the ptal-printd daemon at boot. It's working reasonably well. I like the way the startup message is displayed during the boot process. It fits in with the rest of the Redhat system. I wanted to run it a little differently, so I made a couple of changes. Because I wanted to leave the daemon in /usr/local/bin and the .conf file in /usr/local/etc, I had to modify the script to indicate the correct paths. Rather than copying the script to /etc/rc.d/init.d, I created a symlink to its location ( /usr/local/bin ). I guess your script as written would work correctly if I had put all the files where you suggested. There are a couple of additions to the script I'd like to see, if you care to make them. The script reports success even if the daemon doesn't really start. It happened when the paths were incorrect. Add some error control features and/or a message to indicate failure if it occurs. Don't create a lock file unless the daemon sucessfully starts. I think David would like users to be able to start a copy of the daemon, so could you make that easier? /var/lock/subsys is only writable by root, so a user's lock file would need to go somewhere else. Your script is a good idea, I think. -- Joe Piolunek |