mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-02-04 07:17:15 +08:00
dbed00df54
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@1172 af4574ff-66df-0310-9fd7-8a98e5e911e0
56 lines
1.4 KiB
XML
56 lines
1.4 KiB
XML
<sect2>
|
|
<title>Configuring <application>portmap</application></title>
|
|
|
|
<sect3><title>Config files</title>
|
|
<para><filename>/etc/rc.d/init.d/portmap</filename></para>
|
|
</sect3>
|
|
|
|
<sect3><title>Create the <command>portmap</command> boot script</title>
|
|
|
|
<screen><userinput><command>cat > /etc/rc.d/init.d/portmap << "EOF"</command>
|
|
#!/bin/sh
|
|
# Begin /etc/rc.d/init.d/portmap
|
|
|
|
source /etc/rc.d/init.d/functions
|
|
|
|
case "$1" in
|
|
start)
|
|
echo "Starting RPC Portmap"
|
|
loadproc /sbin/portmap
|
|
;;
|
|
|
|
stop)
|
|
echo "Stopping Portmap"
|
|
killproc /sbin/portmap
|
|
;;
|
|
|
|
restart)
|
|
$0 stop
|
|
/bin/sleep 1
|
|
$0 start
|
|
;;
|
|
|
|
*)
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
exit 1
|
|
;;
|
|
|
|
esac
|
|
|
|
# End /etc/rc.d/init.d/portmap
|
|
<command>EOF
|
|
chmod 754 /etc/rc.d/init.d/portmap &&
|
|
cd /etc/rc.d/init.d &&
|
|
ln -sf ../init.d/portmap ../rc0.d/K49portmap &&
|
|
ln -sf ../init.d/portmap ../rc1.d/K49portmap &&
|
|
ln -sf ../init.d/portmap ../rc2.d/K49portmap &&
|
|
ln -sf ../init.d/portmap ../rc3.d/S22portmap &&
|
|
ln -sf ../init.d/portmap ../rc4.d/S22portmap &&
|
|
ln -sf ../init.d/portmap ../rc5.d/S22portmap &&
|
|
ln -sf ../init.d/portmap ../rc6.d/K49portmap</command></userinput></screen>
|
|
|
|
</sect3>
|
|
|
|
</sect2>
|
|
|