[techtalk] Starting programs at boot -- various questions

Alex Yan flare at serv.net
Thu May 11 22:06:26 EST 2000


> Hi all,

Hi Darren,

> Two questions:
> 
> 1. I recently installed a true type font server, xfstt, primarily because
> I miss Verdana, et al, when web browsing. I'd like this to start at boot;
> what's the best way of doing this?

There are a number of ways to do it, but I think your best bet would
be to add the xfstt startup command to /etc/rc.d/rc.local.  If you use
xdm, you might consider putting it in /etc/X11/xdm/Xsession.

> 2. I have a script in my /etc/rc3.d directory to start pppd automatically
> at boot (there's one in all the other rcX.d directories, but I always boot
> in runlevel 3, so I don't really care about the others right now). When
> the machine runs this script, it returns a message about 'comand not
> found'. I'm pretty certain that the offending line in the script occurs in
> this section:
> 
>         # Start daemon.
>         echo -n "Starting pppd: "
>         daemon pppd
>         echo
>         ;;
> 
> Specifically, the 'daemon pppd' line. I'm assuming this because I can't
> locate a 'daemon' command. In a similar vein, this later section of the
> script has a similar problem:
> 
>         # Stop daemon.
>         echo -n "Shutting down pppd: "
>         killproc pppd
>         echo
>         ;;
> 
> But in this case it's the 'killproc pppd' line. Same problem: seemingly no
> 'killproc' command.

These "commands" are really "functions" defined in
/etc/rc.d/init.d/functions.  Look in there to make sure they're
defined (and that the functions file actually exists).  You should
also check to make sure that somewhere in that pppd startup script,
before you call daemon() and killproc(), you source the function
library:

 # Source function library.
 . /etc/rc.d/init.d/functions

to load those functions.

If all that looks good (and they should, because that's how redhat
comes), I would try some other things.  There might be some other
reason you're getting that error.  I would try (1) putting the full
path of pppd (usually /usr/sbin/pppd).  (2) Another reason could be
that the path of something in your pppd startup scripts is not defined
at boot-up time, like the "chat" command in /etc/ppp/options, so you
might try to make sure their full paths are in there too.

Lots of things in /etc/rc.d/init.d use the daemon() and killproc()
functions, so if you're having problems with them with pppd, you'd
probably have problems with them in other startup scripts as well.

If all else fails, remove that pppd script from the rcX.d directories,
and add the pppd startup to /etc/rc.d/rc.local.  :)

> So, basically: where can I find these two programs? I've poked around the
> web a bit but I can't find anything that's very helpful. I'd like to get
> this figured out since I'm way tired of having to 'su' every time I start
> the machine.
> 
> Any help would be greatly, greatly appreciated!
> 
> Thanks!

Good luck!

-- 

-Alex Yan
 flare at serv.net





More information about the Techtalk mailing list