Changeset 40d91bde


Ignore:
Timestamp:
03/22/2004 07:42:22 AM (17 years ago)
Author:
Tushar Teredesai <tushar@…>
Branches:
10.0, 10.1, 11.0, 6.0, 6.1, 6.2, 6.2.0, 6.2.0-rc1, 6.2.0-rc2, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, krejzi/svn, nosym, perl-modules, qt5new, systemd-11177, systemd-13485, trunk, v5_1, v5_1-pre1, xry111/git-date, xry111/git-date-for-trunk, xry111/git-date-test
Children:
15995a1
Parents:
cc265e51
Message:

First batch of lfs-bootscripts

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@1908 af4574ff-66df-0310-9fd7-8a98e5e911e0

Files:
9 edited

Legend:

Unmodified
Added
Removed
  • general/genlib/libfam/libfam-config.xml

    rcc265e51 r40d91bde  
    4343<command>EOF</command></userinput></screen>
    4444
     45<!--
     46<para>If you do not have any inetd daemon installed and have no
     47wish to install one, you can also start fam during system startup
     48by installing <filename>/etc/rc.d/init.d/fam</filename>
     49init script included in the
     50<xref linkend="intro-important-bootscripts"/> package.</para>
     51                                                                                                               
     52<screen><userinput><command>make install-fam</command></userinput></screen>
     53-->
     54
    4555</sect3>
    4656
  • general/graphlib/libmng/libmng-exp.xml

    rcc265e51 r40d91bde  
    22<title>Command explanations</title>
    33
    4 <para><command>./autogen.sh</command>: First we have to create proper
    5 configuration scripts for the Linux platform.</para>
     4<para><command>./autogen.sh</command>: This package does not ship
     5with the configure script. The autotool files need to be generated
     6before configuring the package.</para>
    67
    78<para><screen><command>./configure --prefix=/usr</command></screen>
  • general/sysutils/fcron/fcron-config.xml

    rcc265e51 r40d91bde  
    2020situation.</para>
    2121
    22 <para>Create the boot script with the following:</para>
    23 
    24 <screen><userinput><command>cat &gt; /etc/rc.d/init.d/fcron &lt;&lt; "EOF"
    25 #!/bin/sh
    26 # Begin $rc_base/init.d/fcron
    27 
    28 # Based on sysklogd script from LFS-3.1 and earlier.
    29 # Rewritten by Gerard Beekmans  - gerard@linuxfromscratch.org
    30 
    31 . /etc/sysconfig/rc
    32 . $rc_functions
    33 
    34 case "$1" in
    35         start)
    36                 echo "Starting fcron..."
    37                 loadproc fcron
    38                 ;;
    39 
    40         stop)
    41                 echo "Stopping fcron..."
    42                 killproc fcron
    43                 ;;
    44 
    45         restart)
    46                 $0 stop
    47                 sleep 1
    48                 $0 start
    49                 ;;
    50 
    51         status)
    52                 statusproc fcron
    53                 ;;
    54 
    55         *)
    56                 echo "Usage: $0 {start|stop|restart|status}"
    57                 exit 1
    58                 ;;
    59 esac
    60 
    61 # End $rc_base/init.d/fcron
    62 EOF
    63 chmod 755 /etc/rc.d/init.d/fcron</command></userinput></screen>
    64 
    65 <para>Create the symbolic links to this file in the relevant
    66 <filename class="directory">rc.d</filename> directory
    67 with the following commands:</para>
    68 
    69 <screen><userinput><command>cd /etc/rc.d/init.d &amp;&amp;
    70 ln -sf ../init.d/fcron ../rc0.d/K08fcron &amp;&amp;
    71 ln -sf ../init.d/fcron ../rc2.d/S40fcron &amp;&amp;
    72 ln -sf ../init.d/fcron ../rc3.d/S40fcron &amp;&amp;
    73 ln -sf ../init.d/fcron ../rc4.d/S40fcron &amp;&amp;
    74 ln -sf ../init.d/fcron ../rc5.d/S40fcron &amp;&amp;
    75 ln -sf ../init.d/fcron ../rc6.d/K08fcron</command></userinput></screen>
     22<para>Install <filename>/etc/rc.d/init.d/fcron</filename>
     23init script from the <xref linkend="intro-important-bootscripts"/> package.</para>
     24                                                                                                               
     25<screen><userinput><command>make install-fcron</command></userinput></screen>
    7626
    7727</sect3>
  • general/sysutils/gpm/gpm-config.xml

    rcc265e51 r40d91bde  
    33
    44<sect3><title>gpm init.d script</title>
    5 <para>The <command>gpm</command> init.d script can be created using
    6 the following commands:  <!-- (This assumes that you have followed the
    7 <acronym>LFS</acronym> default of having your $rc_base set to <filename
    8 class="directory">/etc/rc.d</filename>) --></para>
    9 <screen><userinput><command>cat &gt; /etc/rc.d/init.d/gpm &lt;&lt; "EOF"</command>
    10 #!/bin/sh
    11 # Begin $rc_base/init.d/gpm
     5<para>Install the <filename>/etc/rc.d/init.d/gpm</filename>
     6init script included in the
     7<xref linkend="intro-important-bootscripts"/> package.</para>
    128
    13 # Based on sysklogd script from LFS-3.1 and earlier.
    14 # Rewritten by Gerard Beekmans  - gerard@linuxfromscratch.org
    15 # GPM specific parts by Mark Hymers - markh@linuxfromscratch.org
     9<screen><userinput><command>make install-gpm</command></userinput></screen>
    1610
    17 . /etc/sysconfig/rc
    18 . $rc_functions
    19 
    20 if [ -f /etc/sysconfig/mouse ]
    21         then
    22         source /etc/sysconfig/mouse
    23 fi
    24 
    25 if [ -z "$MDEVICE" ] || [ -z "$PROTOCOL" ]
    26         then
    27         echo "Please create an /etc/sysconfig/mouse file containing"
    28         echo "MDEVICE and PROTOCOL values"
    29         exit 1;
    30 fi
    31 
    32 case "$1" in
    33         start)
    34                 echo "Starting gpm..."
    35                 loadproc gpm -m $MDEVICE -t $PROTOCOL
    36                 ;;
    37 
    38         stop)
    39                 echo "Stopping gpm..."
    40                 killproc gpm
    41                 ;;
    42 
    43         restart)
    44                 $0 stop
    45                 sleep 1
    46                 $0 start
    47                 ;;
    48 
    49         status)
    50                 statusproc gpm
    51                 ;;
    52 
    53         *)
    54                 echo "Usage: $0 {start|stop|restart|status}"
    55                 exit 1
    56                 ;;
    57 esac
    58 
    59 # End $rc_base/init.d/gpm
    60 <command>EOF
    61 chmod 755 /etc/rc.d/init.d/gpm</command></userinput></screen>
    62 
    63 <para>You then need to create symbolic links to this file in the
    64 relevant <filename>rc.d</filename> directories.  For example:</para>
    65 <screen><userinput><command>cd /etc/rc.d/init.d &amp;&amp;
    66 ln -sf ../init.d/gpm ../rc0.d/K10gpm &amp;&amp;
    67 ln -sf ../init.d/gpm ../rc1.d/K10gpm &amp;&amp;
    68 ln -sf ../init.d/gpm ../rc2.d/K10gpm &amp;&amp;
    69 ln -sf ../init.d/gpm ../rc3.d/S70gpm &amp;&amp;
    70 ln -sf ../init.d/gpm ../rc4.d/S70gpm &amp;&amp;
    71 ln -sf ../init.d/gpm ../rc5.d/S70gpm &amp;&amp;
    72 ln -sf ../init.d/gpm ../rc6.d/K10gpm</command></userinput></screen>
    7311</sect3>
    7412
  • index.xml

    rcc265e51 r40d91bde  
    33                        "/usr/share/docbook/docbookx.dtd" [
    44
    5 <!ENTITY version "CVS-20040321">
    6 <!ENTITY releasedate "March 21st, 2004">
     5<!ENTITY version "CVS-20040322">
     6<!ENTITY releasedate "March 22nd, 2004">
    77<!ENTITY blfs-version "cvs">
    88
  • introduction/important/bootscripts.xml

    rcc265e51 r40d91bde  
    1010<acronym>BLFS</acronym> system.  When a script is requested from
    1111lfs-bootscritps, simply change to the directory and execute the given
    12 'make install-&lt;init-script&gt;' command.</para>
     12<command>make install-&lt;init-script&gt;</command> command. This command installs the
     13init script to its proper location (along with any auxillary configuration
     14scripts) and also creates the appropriate symlinks to start and stop the
     15service at the appropriate run-level.</para>
    1316
    1417<para>If you are installing <acronym>BLFS</acronym>
     
    1922information on the lfs-bootscripts package.</para>
    2023
     24<note><para>It is advisable to peruse each bootscript before installation to
     25ascertain that it satisfies your need. Also verify that the start and stop
     26symlinks it creates match your preferences.</para></note>
     27
    2128</sect1>
  • introduction/welcome/changelog.xml

    rcc265e51 r40d91bde  
    1111
    1212<itemizedlist>
     13
     14<listitem><para>March 22nd, 2004 [tushar]: Added fam, fcron, gpm, netfs,
     15and random lfs-bootscripts. Added note that users should refer to the
     16check the bootscript before installing.</para></listitem>
    1317
    1418<listitem><para>March 21st, 2004 [tushar]: Updated network related
  • postlfs/config/netfs.xml

    rcc265e51 r40d91bde  
    33<title>Configuring for Network Filesystems</title>
    44
    5 <para>While <acronym>LFS</acronym> is capable of mounting NFS volumes from
    6 the get go, the lfs-bootscripts are not quite ready for this configuration.
    7 Network filesystems should be unmounted before the network goes down.  The
    8 <filename>netfs</filename> script below will prepare your LFS for mounting
    9 network filesystems at boot time, and unmounting them when the network
    10 is stopped.</para>
     5<para>While <acronym>LFS</acronym> is capable of mounting network file
     6systems such as <acronym>NFS</acronym> these are not mounted by
     7<filename>mountfs</filename> init script since the tools needed to mount
     8these systems may not be available on the root partition and also since
     9network file systems need to be mounted after the networking is on and
     10need to be unmounted before the network goes down.</para>
    1111
    12 <para>  The following commands will create the <filename>netfs</filename>
    13 script:</para>
    14 
    15 <screen><command>cat &gt; /etc/rc.d/init.d/netfs &lt;&lt; "EOF"</command>
    16 #!/bin/sh
    17 # Begin $rc_base/init.d/netfs
    18                                                                                
    19 # Based on sysklogd script from LFS-3.1 and earlier.
    20 # Rewritten by Gerard Beekmans  - gerard@linuxfromscratch.org
    21 # netfs script written by Nathan Coulson - conathan@conet.dyndns.org
    22 # and by DJ Lucas - dj@lucasit.com
    23                                                                                
    24 . /etc/sysconfig/rc
    25 . $rc_functions
    26                                                                                
    27 case "$1" in
    28                                                                                
    29         start)
    30                 # The following line mounts all entries in fstab that
    31                 # have the _netdev option.  This is required for network
    32                 # filesystems to be mounted at boot time.
    33                 echo "Mounting network volumes..."
    34                 mount -a -O _netdev
    35                 evaluate_retval
    36                 ;;
    37                                                                                
    38         stop)
    39                 echo -n "Unmounting network volumes..."
    40                                                                                
    41                 # The following line obtains a list from the output of
    42                 # mount for all netfs types and anything that was
    43                 # mounted with the _netdev option.
    44                 NETMOUNTS=`mount | grep '_netdev\|smbfs\|ncpfs|\coda\|nfs' \
    45                         | cut -d " " -f 3 | sed 's/$/ /g'`
    46                                                                                
    47                 # Check to see if anything was listed from above
    48                 # (see if anything is actually needs to be unmounted)
    49                 if [ x"$NETMOUNTS" != x ]
    50                 then
    51                         # There is something mounted
    52                         # terminate the echo -n above
    53                         echo " "
    54                                                                                
    55                         # Try and stop processes the nice way
    56                         # (probably won't work in most cases)
    57                         fuser -m -SIGTERM $NETMOUNTS &gt; /dev/null
    58                                                                                
    59                         # Check and see if it found anything.  If it
    60                         # did, then give 3 seconds for things to exit
    61                         # the nice way before killing them off. 
    62                         # This one will work all of the time!
    63                         if [ $? == 0 ]
    64                         then
    65                                 sleep 3
    66                                 fuser -km $NETMOUNTS &gt; /dev/null
    67                         fi
    68                                                                                
    69                         # We now need to unmount all network filesystems.
    70                         # We will do this with two umount commands to allow
    71                         # for broken behavior of smbmount, and also to make
    72                         # certain that netmounts without the _netdev option
    73                         # will still get unmounted.
    74                         umount -a -O _netdev
    75                         # save the retval
    76                         if [ $? != 0 ]
    77                         then
    78                                 NERRVAL=1
    79                         fi
    80 
    81                         # Now catch the rest of the network filesystems
    82                         # by fstype.  This list can be extended later as
    83                         # more network filesystems are supported by mount.
    84                         umount -a -t coda,ncpfs,nfs,smbfs
    85                         if [ $? == 0]
    86                         then
    87                                 [ -z $NERRVAL ]
    88                                 evaluate_retval
    89                         else
    90                                 # make certain that we return an error
    91                                 /bin/false             
    92                                 evaluate_retval
    93                         fi
    94                 else
    95                         # There is nothing mounted
    96                         echo "No network volumes mounted!"
    97                         # print a nice '[  OK  ]' message
    98                         evaluate_retval
    99                 fi
    100                 ;;
    101                                                                                
    102 *)
    103                 echo "Usage: $0 {start|stop}"
    104                 exit 1
    105                 ;;
    106 esac
    107                                                                                
    108 # End $rc_base/init.d/netfs
    109 EOF
    110 <command>chmod 0755 /etc/rc.d/init.d/netfs</command></screen>
    111 
    112 <para>While the excessive comments in the script might make people cringe, the
    113 important part to note is that network filesystems that should be mounted at
    114 boot time, must have the <emphasis role="strong">_netdev</emphasis>
    115 option passed to them in <filename>/etc/fstab</filename>.</para>
    116 
    117 <para>Now put the necessary symlinks in place.</para>
    118 
    119 <screen><command>ln -sf ../init.d/netfs /etc/rc.d/rc0.d/K47netfs &amp;&amp;
    120 ln -sf ../init.d/netfs /etc/rc.d/rc1.d/K47netfs &amp;&amp;
    121 ln -sf ../init.d/netfs /etc/rc.d/rc2.d/K47netfs &amp;&amp;
    122 ln -sf ../init.d/netfs /etc/rc.d/rc3.d/S28netfs &amp;&amp;
    123 ln -sf ../init.d/netfs /etc/rc.d/rc4.d/S28netfs &amp;&amp;
    124 ln -sf ../init.d/netfs /etc/rc.d/rc5.d/S28netfs &amp;&amp;
    125 ln -sf ../init.d/netfs /etc/rc.d/rc6.d/K47netfs</command></screen>
     12<para>Install the <filename>/etc/rc.d/init.d/netfs</filename>
     13network mount script included with the
     14<xref linkend="intro-important-bootscripts"/> package.</para>
     15                                                                                                               
     16<screen><userinput><command>make install-netfs</command></userinput></screen>
    12617
    12718</sect1>
  • postlfs/config/random.xml

    rcc265e51 r40d91bde  
    1414at startup may always be the same.  In order to counteract this effect,
    1515you should carry the entropy pool information across your shut-downs and
    16 start-ups. The following init.d script and links will perform this function
    17 for you automatically.</para>
     16start-ups.</para>
    1817
    19 <screen><userinput><command>cat &gt; /etc/rc.d/init.d/random &lt;&lt; "EOF"
    20 </command>
    21 #!/bin/sh
    22 # Begin $rc_base/init.d/random
    23 
    24 # Based on sysklogd script from LFS-3.1 and earlier.
    25 # Rewritten by Gerard Beekmans  - gerard@linuxfromscratch.org
    26 # Random script elements by Larry Lawrence
    27 
    28 . /etc/sysconfig/rc
    29 . $rc_functions
    30 
    31 case "$1" in
    32         start)
    33                 echo "Initializing kernel random number generator..."
    34                 if [ -f /var/tmp/random-seed ]; then
    35                         cat /var/tmp/random-seed >/dev/urandom
    36                 fi
    37                 dd if=/dev/urandom of=/var/tmp/random-seed count=1 &amp;>/dev/null
    38                 evaluate_retval
    39                 ;;
    40                
    41         stop)
    42                 echo "Saving random seed..."
    43                 dd if=/dev/urandom of=/var/tmp/random-seed count=1 &amp;>/dev/null
    44                 evaluate_retval
    45                 ;;
    46 
    47         *)
    48                 echo "Usage: $0 {start|stop}"
    49                 exit 1
    50                 ;;
    51 esac
    52 
    53 # End $rc_base/init.d/random
    54 <command>EOF
    55 chmod 755 /etc/rc.d/init.d/random</command></userinput></screen>
    56 
    57 <para>Create the symbolic links to this file in the relevant
    58 <filename class="directory">rc.d</filename> directories
    59 with the following commands:</para>
    60 <screen><userinput><command>cd /etc/rc.d/init.d &amp;&amp;
    61 ln -sf ../init.d/random ../rc0.d/K45random &amp;&amp;
    62 ln -sf ../init.d/random ../rc2.d/S25random &amp;&amp;
    63 ln -sf ../init.d/random ../rc3.d/S25random &amp;&amp;
    64 ln -sf ../init.d/random ../rc4.d/S25random &amp;&amp;
    65 ln -sf ../init.d/random ../rc5.d/S25random &amp;&amp;
    66 ln -sf ../init.d/random ../rc6.d/K45random</command></userinput></screen>
    67 
     18<para>Install the <filename>/etc/rc.d/init.d/random</filename>
     19init script included with the
     20<xref linkend="intro-important-bootscripts"/> package.</para>
     21                                                                                                               
     22<screen><userinput><command>make install-random</command></userinput></screen>
    6823
    6924</sect1>
Note: See TracChangeset for help on using the changeset viewer.