SUBMISSION: init scripts: random, portmap, nfs, sshd, mountnfs

Nicholas Leippe nick at byu.edu
Mon Jan 7 19:48:08 PST 2002


All of these scripts are based on other scripts and/or examples found
included with the sources or in LFS hints documentation.

random
======
saves/restores /dev/urandom, which is the kernel entropy pool-based
random number generator used by various encryption libraries and
portmap as well iirc.  A possible candidate for inclusion in the
base LFS.

portmap
=======
LFS styled script to start/stop the portmapper daemon based on the
example provided in the sources.  Handles saving/restoring the
RPC service table.

nfs-server
==========
LFS styled script to start/stop nfsd, mountd, and optionally rquotad
based on the example provided in the sources.

nfs-client
==========
LFS styled script to start/stop statd and lockd.  unmounts nfs mounts
when stopping.  ie, this is the nfs-client servers, but doesn't handle
mounting nfs volumes.  It could be argued that this is the place to
handle mounting nfs volumes, but imo it should just do the *one* thing
and do it well.  The unmount is just a requisite to its stop
functionality.

mountnfs
========
An attempt based on the template to mount/unmount nfs volumes.
Unfortunately, it's 'start' doesn't work because you cannot:

> mount -a -t nfs

All of the nfs entries in fstab are necessarily 'noauto' optioned,
mount -a skips them, strangely enough:

> umount -a -t nfs

works just fine.
Not sure of a good solution for this short of parsing fstab to find
the nfs entries, or making sure that portmap and nfs-client are
started successfully before mountfs is called and letting that handle
it by leaving off the 'noauto' option.

sshd
====
Simple no-brainer based on the template to start/stop sshd.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sshd
Type: application/x-shellscript
Size: 841 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/blfs-dev/attachments/20020107/04c923e9/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nfs-server
Type: application/x-shellscript
Size: 2070 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/blfs-dev/attachments/20020107/04c923e9/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: portmap
Type: application/x-shellscript
Size: 1123 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/blfs-dev/attachments/20020107/04c923e9/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: random
Type: application/x-shellscript
Size: 1044 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/blfs-dev/attachments/20020107/04c923e9/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nfs-client
Type: application/x-shellscript
Size: 1155 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/blfs-dev/attachments/20020107/04c923e9/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mountnfs
Type: application/x-shellscript
Size: 418 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/blfs-dev/attachments/20020107/04c923e9/attachment-0005.bin>


More information about the blfs-dev mailing list