[K12OSN] nfs problems, continued

Les Mikesell les at futuresource.com
Thu Jul 1 20:05:05 UTC 2004


On Thu, 2004-07-01 at 14:44, Carl Keil wrote:

> But my question is, does anyone know what I need to do to not have to type 
> "service nfs restart" at the command line every time I reboot?  I'd love to 
> just reboot this puppy and have everything start up.  But I'm not getting 
> anywhere with google, etc.

Short answer (Redhat's way...)

chkconfig --level 345 nfs on

Long answer:

In /etc/rc.d/init.d there are scripts to start and stop services
as you go up and down runlevels.  They are written to take an
argument of 'start' or 'stop' with optional 'status' and 'restart'.
Runlevel
 1 = single user
 2 = multiuser
 3 = network services start
 4 = spare
 5 = start X for graphical logins
 6 = reboot

There are /etc/rc.d/rc.? directories for each runlevel.  The
scripts in /etc/rc.d/init.d are symlinked into each runlevel
where they should start when the runlevel increases with a
name prefixed with S and a number that will alpha-sort into
the right startup order. They are symlinked where they should
stop when going down runlevels with a name starting with K.
The system executes each S* entry (taking advantage of the
shell's sorted wildcard expansion to get the right order) with
the 'start' argument in each rc.? directory up to the level
specified as the default in /etc/inittab at startup.  The
'long' scheme has been in SysV unix for 20+ years.  RedHat
added the 'service' and chkconfig wrappers for convenience
and put hints for chkconfig in the init scripts so it knows
the number portion of the symlink name.  (Actually SGI may have
done some of this first, but not all unix or Linux systems
have the service/chkconfig commands).

---
  Les Mikesell
   les at futuresource.com

      





More information about the K12OSN mailing list