mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-02-03 06:27:16 +08:00
Completed lfs-bootscripts changes
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@1942 af4574ff-66df-0310-9fd7-8a98e5e911e0
This commit is contained in:
parent
ae9c5281f1
commit
fe88f5841a
@ -21,58 +21,10 @@ dedicated user:</para>
|
||||
detailed instructions on customizing your Apache <acronym>HTTP</acronym>
|
||||
server.</para>
|
||||
|
||||
<para>To automate the running of Apache, use the following command to
|
||||
create the init.d script:</para>
|
||||
|
||||
<screen><userinput><command>cat > /etc/rc.d/init.d/apache << "EOF"</command>
|
||||
#!/bin/sh
|
||||
|
||||
. /etc/sysconfig/rc
|
||||
. $rc_functions
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Starting Apache daemon..."
|
||||
/usr/sbin/apachectl -k start
|
||||
evaluate_retval
|
||||
;;
|
||||
|
||||
stop)
|
||||
echo "Stopping Apache daemon..."
|
||||
/usr/sbin/apachectl -k stop
|
||||
evaluate_retval
|
||||
;;
|
||||
|
||||
restart)
|
||||
echo "Restarting Apache daemon..."
|
||||
/usr/sbin/apachectl -k restart
|
||||
evaluate_retval
|
||||
;;
|
||||
|
||||
status)
|
||||
statusproc /usr/sbin/httpd
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
<command>EOF
|
||||
chmod 755 /etc/rc.d/init.d/apache</command></userinput></screen>
|
||||
|
||||
<para>Create the symbolic links to this file in the relevant
|
||||
<filename class="directory">rc.d</filename> directory
|
||||
with the following commands:</para>
|
||||
|
||||
<screen><userinput><command>cd /etc/rc.d/init.d &&
|
||||
ln -sf ../init.d/apache ../rc0.d/K28apache &&
|
||||
ln -sf ../init.d/apache ../rc1.d/K28apache &&
|
||||
ln -sf ../init.d/apache ../rc2.d/K28apache &&
|
||||
ln -sf ../init.d/apache ../rc3.d/S32apache &&
|
||||
ln -sf ../init.d/apache ../rc4.d/S32apache &&
|
||||
ln -sf ../init.d/apache ../rc5.d/S32apache &&
|
||||
ln -sf ../init.d/apache ../rc6.d/K28apache</command></userinput></screen>
|
||||
<para>Install <filename>/etc/rc.d/init.d/apache</filename>
|
||||
init script included in the <xref linkend="intro-important-bootscripts"/> package.</para>
|
||||
|
||||
<screen><userinput><command>make install-apache</command></userinput></screen>
|
||||
|
||||
</sect3>
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
<sect2>
|
||||
<title>Command explanations</title>
|
||||
|
||||
<para><parameter>--with-expat=/usr</parameter>: Uses system installed
|
||||
expat. <emphasis>If you have installed expat and do not use this switch, the
|
||||
apache installation may overwrite some files from the expat installation.</emphasis></para>
|
||||
<para><parameter>--enable-mods-shared=all</parameter>: We want modules
|
||||
to be compiled and used as Dynamic Shared Objects
|
||||
(<acronym>DSO</acronym>s) so they can be included and excluded from the
|
||||
|
@ -24,7 +24,7 @@ url="&patch-root;/httpd-&apache-version;-config.patch"/></para></listitem>
|
||||
<sect3><title><application>Apache</application> dependencies</title>
|
||||
<sect4><title>Optional</title>
|
||||
<para><xref linkend="db"/> or <xref linkend="gdbm"/>, <xref linkend="openssl"/>, <xref
|
||||
linkend="openldap"/> and <xref linkend="lynx"/>
|
||||
linkend="openldap"/> <xref linkend="expat"/> and <xref linkend="lynx"/>
|
||||
</para></sect4>
|
||||
</sect3>
|
||||
|
||||
|
@ -1,6 +1,14 @@
|
||||
<sect2>
|
||||
<title>Configuring <application>ProFTPD</application></title>
|
||||
|
||||
<sect3><title>proftpd init.d script</title>
|
||||
<para>Install <filename>/etc/rc.d/init.d/proftpd</filename>
|
||||
init script included in the <xref linkend="intro-important-bootscripts"/> package.</para>
|
||||
|
||||
<screen><userinput><command>make install-proftpd</command></userinput></screen>
|
||||
|
||||
</sect3>
|
||||
|
||||
<sect3><title>Config files</title>
|
||||
|
||||
<para><filename>/etc/proftpd.conf</filename></para>
|
||||
@ -63,66 +71,4 @@ Group proftpd
|
||||
<command>EOF</command></userinput></screen></sect3>
|
||||
|
||||
|
||||
<sect3><title>proftpd init.d script</title>
|
||||
|
||||
<screen><userinput><command>cat > /etc/rc.d/init.d/proftpd << "EOF"</command>
|
||||
#!/bin/sh
|
||||
# Begin $rc_base/init.d/proftpd
|
||||
|
||||
# Based on sysklogd script from LFS-3.1 and earlier.
|
||||
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
|
||||
|
||||
. /etc/sysconfig/rc
|
||||
. $rc_functions
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Starting FTP Server..."
|
||||
loadproc /usr/sbin/proftpd
|
||||
;;
|
||||
|
||||
stop)
|
||||
echo "Stopping FTP Server..."
|
||||
killproc /usr/sbin/proftpd
|
||||
;;
|
||||
|
||||
reload)
|
||||
echo "Reloading FTP Server..."
|
||||
reloadproc /usr/sbin/proftpd
|
||||
;;
|
||||
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
|
||||
status)
|
||||
statusproc /usr/sbin/proftpd
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|reload|restart|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# End $rc_base/init.d/proftpd
|
||||
<command>EOF
|
||||
chmod 755 /etc/rc.d/init.d/proftpd</command></userinput></screen>
|
||||
|
||||
<para>Create the symbolic links to this file in the relevant <filename
|
||||
class="directory">rc.d</filename> directories with the following
|
||||
commands:</para>
|
||||
<screen><userinput><command>cd /etc/rc.d/init.d &&
|
||||
ln -sf ../init.d/proftpd ../rc0.d/K28proftpd &&
|
||||
ln -sf ../init.d/proftpd ../rc1.d/K28proftpd &&
|
||||
ln -sf ../init.d/proftpd ../rc2.d/K28proftpd &&
|
||||
ln -sf ../init.d/proftpd ../rc3.d/S32proftpd &&
|
||||
ln -sf ../init.d/proftpd ../rc4.d/S32proftpd &&
|
||||
ln -sf ../init.d/proftpd ../rc5.d/S32proftpd &&
|
||||
ln -sf ../init.d/proftpd ../rc6.d/K28proftpd</command></userinput></screen>
|
||||
|
||||
</sect3>
|
||||
|
||||
</sect2>
|
||||
|
@ -28,64 +28,10 @@ session required pam_unix.so
|
||||
|
||||
<para><command>gdm</command> can be tested by executing it from a root console.</para>
|
||||
|
||||
<para>To automate the running of <command>gdm</command>, use the following command to
|
||||
create the init.d script if your
|
||||
GNOME_PREFIX=/opt/gnome-&gnome-version;. The fully qualified paths can
|
||||
be removed for GNOME_PREFIX=/usr:</para>
|
||||
<screen><userinput><command>cat > /etc/rc.d/init.d/gdm << "EOF"</command>
|
||||
#!/bin/sh
|
||||
# Begin $rc_base/init.d/gdm
|
||||
<para>To start a graphical login at boot, install <filename>/etc/rc.d/init.d/gdm</filename>
|
||||
init script included in the <xref linkend="intro-important-bootscripts"/> package.</para>
|
||||
|
||||
# Based on sysklogd script from LFS-3.1 and earlier.
|
||||
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
|
||||
|
||||
. /etc/sysconfig/rc
|
||||
. $rc_functions
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Starting GDM..."
|
||||
loadproc /opt/gnome-&gnome-version;/bin/gdm
|
||||
;;
|
||||
|
||||
stop)
|
||||
echo "Stopping GDM..."
|
||||
if [ -f /var/run/gdm.pid ]; then
|
||||
loadproc /opt/gnome-&gnome-version;/sbin/gdm-stop
|
||||
fi
|
||||
;;
|
||||
|
||||
reload)
|
||||
echo "Reloading GDM..."
|
||||
reloadproc /opt/gnome-&gnome-version;/sbin/gdm-safe-restart
|
||||
;;
|
||||
|
||||
restart)
|
||||
echo "Restarting GDM..."
|
||||
loadproc /opt/gnome-&gnome-version;/sbin/gdm-restart
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|reload|restart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# End $rc_base/init.d/gdm
|
||||
<command>EOF
|
||||
chmod 755 /etc/rc.d/init.d/gdm</command></userinput></screen>
|
||||
|
||||
<para>Create the symbolic links to this file in the relevant
|
||||
<filename>rc.d</filename>
|
||||
directory with the following commands:</para>
|
||||
<screen><userinput><command>cd /etc/rc.d/init.d &&
|
||||
ln -sf ../init.d/gdm ../rc0.d/K05gdm &&
|
||||
ln -sf ../init.d/gdm ../rc1.d/K05gdm &&
|
||||
ln -sf ../init.d/gdm ../rc2.d/K05gdm &&
|
||||
ln -sf ../init.d/gdm ../rc3.d/K05gdm &&
|
||||
ln -sf ../init.d/gdm ../rc4.d/K05gdm &&
|
||||
ln -sf ../init.d/gdm ../rc5.d/S95gdm &&
|
||||
ln -sf ../init.d/gdm ../rc6.d/K05gdm</command></userinput></screen>
|
||||
<screen><userinput><command>make install-gdm</command></userinput></screen>
|
||||
|
||||
<para>To autostart with a graphical login, edit
|
||||
<filename>/etc/inittab</filename> so that the line reading</para>
|
||||
|
@ -2,8 +2,8 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
|
||||
"/usr/share/docbook/docbookx.dtd" [
|
||||
|
||||
<!ENTITY version "CVS-20040327">
|
||||
<!ENTITY releasedate "March 27th, 2004">
|
||||
<!ENTITY version "CVS-20040328">
|
||||
<!ENTITY releasedate "March 28th, 2004">
|
||||
<!ENTITY blfs-version "cvs">
|
||||
|
||||
<!ENTITY % book SYSTEM "book/book.ent">
|
||||
|
@ -12,6 +12,7 @@ who wrote what.</para>
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para>March 27th, 2004 [tushar]: Updated mysql, postgresql, bind, dhcp
|
||||
apache, proftpd, gdm, alsa, cups, lprng, xfree86,
|
||||
openssh, rsync, samba and xinetd to use lfs-bootscripts for init scripts.</para></listitem>
|
||||
|
||||
<listitem><para>March 27th, 2004 [tushar]: Added pico to the list of text editors.</para></listitem>
|
||||
|
@ -18,64 +18,11 @@ those readers who wish to do this.</para>
|
||||
<para>The <application><acronym>ALSA</acronym> Driver</application> package
|
||||
installs a script as <filename>/etc/rc.d/init.d/alsasound</filename>. While it
|
||||
is possible to use this script, it contains a lot of extraneous detail which
|
||||
isn't needed on an <acronym>LFS</acronym> system and so we create our own
|
||||
script <filename>/etc/rc.d/init.d/alsa</filename>.</para>
|
||||
isn't needed on an <acronym>LFS</acronym> system and so we install the init
|
||||
script <filename>/etc/rc.d/init.d/alsa</filename> included in the
|
||||
<xref linkend="intro-important-bootscripts"/> package.</para>
|
||||
|
||||
<para>To create the <application><acronym>ALSA</acronym></application> script, do the following:</para>
|
||||
|
||||
<screen><userinput><command>cat > /etc/rc.d/init.d/alsa << "EOF"</command>
|
||||
#!/bin/sh
|
||||
# Begin $rc_base/init.d/alsa
|
||||
|
||||
# Based on sysklogd script from LFS-3.1 and earlier.
|
||||
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
|
||||
# ALSA specific parts by Mark Hymers - markh@linuxfromscratch.org
|
||||
# Stores mixer settings in the default location: /etc/asound.state
|
||||
|
||||
. /etc/sysconfig/rc
|
||||
. $rc_functions
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Starting ALSA... Restoring volumes..."
|
||||
loadproc /usr/sbin/alsactl restore
|
||||
#echo " Loading MIDI font..."
|
||||
#loadproc sfxload /path/to/soundfont
|
||||
;;
|
||||
|
||||
stop)
|
||||
echo "Stopping ALSA... Saving volumes......"
|
||||
loadproc /usr/sbin/alsactl store
|
||||
#echo " Removing MIDI font.........."
|
||||
#loadproc sfxload -i
|
||||
;;
|
||||
|
||||
restart)
|
||||
$0 stop
|
||||
/bin/sleep 1
|
||||
$0 start
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# End $rc_base/init.d/alsa
|
||||
<command>EOF
|
||||
chmod 755 /etc/rc.d/init.d/alsa</command></userinput></screen>
|
||||
|
||||
<para>You can then create the appropriate symlinks:</para>
|
||||
<screen><userinput><command>cd /etc/rc.d/init.d &&
|
||||
ln -sf ../init.d/alsa ../rc0.d/K35alsa &&
|
||||
ln -sf ../init.d/alsa ../rc1.d/K35alsa &&
|
||||
ln -sf ../init.d/alsa ../rc2.d/S40alsa &&
|
||||
ln -sf ../init.d/alsa ../rc3.d/S40alsa &&
|
||||
ln -sf ../init.d/alsa ../rc4.d/S40alsa &&
|
||||
ln -sf ../init.d/alsa ../rc5.d/S40alsa &&
|
||||
ln -sf ../init.d/alsa ../rc6.d/K35alsa</command></userinput></screen>
|
||||
<screen><userinput><command>make install-alsa</command></userinput></screen>
|
||||
|
||||
<para>Note that all channels of your soundcard are muted by default. You can
|
||||
use the <command>alsamixer</command> program from
|
||||
|
@ -24,8 +24,8 @@ enable it to support certain functionality.</para>
|
||||
&speex;
|
||||
&id3lib;
|
||||
&flac;
|
||||
&libdvdread;
|
||||
&libdvdcss;
|
||||
&libdvdread;
|
||||
&libdv;
|
||||
&liba52;
|
||||
&xvid;
|
||||
|
@ -20,62 +20,9 @@ developers.</para>
|
||||
<para>During the install, <application><acronym>CUPS</acronym></application>
|
||||
created the startup file <filename>/etc/rc.d/init.d/cups</filename>. The file
|
||||
works, but you may want to change it to a more conventional <acronym>LFS
|
||||
</acronym> startup file:</para>
|
||||
</acronym> startup file by installing the script included in the
|
||||
<xref linkend="intro-important-bootscripts"/> package:</para>
|
||||
|
||||
<screen><userinput><command>cat > /etc/rc.d/init.d/cups << "EOF"</command>
|
||||
#!/bin/sh
|
||||
# Begin $rc_base/init.d/cups
|
||||
|
||||
# Start or stop the CUPS server based upon the first argument to the script.
|
||||
|
||||
. /etc/sysconfig/rc
|
||||
. $rc_functions
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
echo "Starting CUPS Printserver..."
|
||||
loadproc /usr/sbin/cupsd
|
||||
;;
|
||||
stop)
|
||||
echo "Stopping CUPS Printserver..."
|
||||
killproc cupsd
|
||||
;;
|
||||
|
||||
reload)
|
||||
echo "Reloading CUPS Printserver..."
|
||||
reloadproc /usr/sbin/cupsd
|
||||
;;
|
||||
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
|
||||
status)
|
||||
statusproc cupsd
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|reload|restart|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# End $rc_base/init.d/cups startup script.
|
||||
<command>EOF</command></userinput></screen>
|
||||
|
||||
<para>Create the symbolic links to this file in the relevant
|
||||
<filename class="directory">rc.d</filename> directory
|
||||
with the following commands:</para>
|
||||
|
||||
<screen><userinput><command>cd /etc/rc.d/init.d &&
|
||||
ln -sf ../init.d/cups ../rc0.d/K00cups &&
|
||||
ln -sf ../init.d/cups ../rc1.d/K00cups &&
|
||||
ln -sf ../init.d/cups ../rc2.d/S99cups &&
|
||||
ln -sf ../init.d/cups ../rc3.d/S99cups &&
|
||||
ln -sf ../init.d/cups ../rc4.d/S99cups &&
|
||||
ln -sf ../init.d/cups ../rc5.d/S99cups &&
|
||||
ln -sf ../init.d/cups ../rc6.d/K00cups</command></userinput></screen>
|
||||
<screen><userinput><command>make install-cups</command></userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
@ -15,67 +15,11 @@ directory which can be some help. Information is also available at
|
||||
url="http://www.linuxprinting.org"/>.</para>
|
||||
|
||||
<para>The init script installed by <application>LPRng</application> is not
|
||||
consistent with <acronym>BLFS</acronym> scripts; therefore, we will create a
|
||||
new one with the following commands:</para>
|
||||
consistent with other <acronym>BLFS</acronym> scripts; therefore, we will install
|
||||
<filename>/etc/rc.d/init.d/lprng</filename>
|
||||
init script included in the <xref linkend="intro-important-bootscripts"/> package.</para>
|
||||
|
||||
<screen><userinput><command>mv /etc/rc.d/init.d/lpd /etc/rc.d/init.d/lpd.orig &&
|
||||
cat > /etc/rc.d/init.d/lpd << "EOF"</command>
|
||||
#!/bin/sh
|
||||
# Begin $rc_base/init.d/lpd
|
||||
|
||||
# Based on sysklogd script from LFS-3.1 and earlier.
|
||||
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
|
||||
|
||||
. /etc/sysconfig/rc
|
||||
. $rc_functions
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Starting lpd..."
|
||||
loadproc /usr/sbin/lpd
|
||||
;;
|
||||
|
||||
stop)
|
||||
echo "Stopping lpd..."
|
||||
killproc /usr/sbin/lpd
|
||||
;;
|
||||
|
||||
reload)
|
||||
echo "Reloading lpd..."
|
||||
reloadproc /usr/sbin/lpd
|
||||
;;
|
||||
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
|
||||
status)
|
||||
statusproc /usr/sbin/lpd
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|reload|restart|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# End $rc_base/init.d/lpd
|
||||
<command>EOF
|
||||
chmod 755 /etc/rc.d/init.d/lpd</command></userinput></screen>
|
||||
|
||||
<para>Create the symbolic links to the lprng init script in the relevant
|
||||
<filename>rc.d</filename> directories with the following
|
||||
commands:</para>
|
||||
<screen><userinput><command>cd /etc/rc.d/init.d &&
|
||||
ln -sf ../init.d/lpd ../rc0.d/K00lprng &&
|
||||
ln -sf ../init.d/lpd ../rc1.d/K00lprng &&
|
||||
ln -sf ../init.d/lpd ../rc2.d/S99lprng &&
|
||||
ln -sf ../init.d/lpd ../rc3.d/S99lprng &&
|
||||
ln -sf ../init.d/lpd ../rc4.d/S99lprng &&
|
||||
ln -sf ../init.d/lpd ../rc5.d/S99lprng &&
|
||||
ln -sf ../init.d/lpd ../rc6.d/K00lprng</command></userinput></screen>
|
||||
<screen><userinput><command>make install-lprng</command></userinput></screen>
|
||||
|
||||
</sect3>
|
||||
|
||||
|
@ -91,19 +91,18 @@ man page.</para>
|
||||
|
||||
<note>
|
||||
|
||||
<para>When starting up, <application>XFree86</application> creates the directory
|
||||
<para>When needed, <application>XFree86</application> creates the directory
|
||||
<filename>/tmp/.ICE-unix</filename> if it does not exist. If this directory is
|
||||
not owned by root, <application>XFree86</application> delays startup by a few seconds
|
||||
and also appends a warning to the logfile. This also affects startup of other
|
||||
applications. To improve performance, perform the following steps as root before
|
||||
starting <application>XFree86</application> for the first time. Additionally, if you
|
||||
use tmpfs or clean out all the files in <filename>/tmp</filename> when you boot,
|
||||
we recommend adding the same instructions to the end of your
|
||||
applications. To improve performance, it is advisable to manually create the directory
|
||||
before XFree86 uses it. Add the file creation to <filename>/etc/sysconfig/createfiles</filename>
|
||||
that is sourced by the
|
||||
<filename>/etc/rc.d/init.d/cleanfs</filename> startup script.</para>
|
||||
|
||||
<screen><userinput>rm -rf /tmp/.ICE-unix &&
|
||||
mkdir /tmp/.ICE-unix &&
|
||||
chmod 1777 /tmp/.ICE-unix</userinput></screen>
|
||||
<screen><userinput><command>cat >> /etc/sysconfig/createfiles << "EOF"</command>
|
||||
dir root root 1777 /tmp/.ICE-unix
|
||||
<command>EOF</command></userinput></screen>
|
||||
|
||||
</note>
|
||||
|
||||
|
@ -1,9 +1,12 @@
|
||||
<sect2>
|
||||
<title>Installation of <application>Mozilla Thunderbird</application></title>
|
||||
|
||||
<warning><para>The current source tarball uses CRLF line-ending (DOS Format). This causes
|
||||
<warning>
|
||||
<para>The current source tarball uses CRLF line-ending (DOS Format). This causes
|
||||
problems during the compilation. Once you extract the tarball, convert the files
|
||||
to UNIX style line endings using <xref linkend="hd2u"/>.</para></warning>
|
||||
to UNIX style line endings using <xref linkend="hd2u"/>.</para>
|
||||
<screen><userinput><command>find -type f -print0 | xargs -0 dos2unix --d2u</command></userinput></screen>
|
||||
</warning>
|
||||
|
||||
<para>The configuration of <application>Mozilla Thunderbird</application> is
|
||||
very similar to <xref linkend="mozilla"/> and hence the options
|
||||
|
Loading…
Reference in New Issue
Block a user