X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=docs%2FLFS-BOOK%2Fscripts%2Fapds07.html;fp=docs%2FLFS-BOOK%2Fscripts%2Fapds07.html;h=2d813a38d6e658fa6252b39a58af4815d47925d9;hb=a411e60d0a358bff7a5d6b7ae144b4efd5c2ad1b;hp=700e332d00b8525ce0d82dd0cbcf8fe4bf117f35;hpb=d6bd32b8c5529ebacf0e3459ef10b18e934ac940;p=linuxjf%2FJF.git diff --git a/docs/LFS-BOOK/scripts/apds07.html b/docs/LFS-BOOK/scripts/apds07.html index 700e332..2d813a3 100644 --- a/docs/LFS-BOOK/scripts/apds07.html +++ b/docs/LFS-BOOK/scripts/apds07.html @@ -11,13 +11,13 @@ -
+ @@ -51,54 +51,67 @@#!/bin/sh ######################################################################## -# Begin $rc_base/init.d/swap +# Begin swap # # Description : Swap Control Script # # Authors : Gerard Beekmans - gerard@linuxfromscratch.org +# DJ Lucas - dj@linuxfromscratch.org +# Update : Bruce Dubbs - bdubbs@linuxfromscratch.org # -# Version : 00.00 -# -# Notes : +# Version : LFS 7.0 # ######################################################################## -. /etc/sysconfig/rc -. ${rc_functions} +### BEGIN INIT INFO +# Provides: swap +# Required-Start: udev +# Should-Start: modules +# Required-Stop: localnet +# Should-Stop: +# Default-Start: S +# Default-Stop: 0 6 +# Short-Description: Mounts and unmounts swap partitions. +# Description: Mounts and unmounts swap partitions defined in +# /etc/fstab. +# X-LFS-Provided-By: LFS +### END INIT INFO + +. /lib/lsb/init-functions case "${1}" in - start) - boot_mesg "Activating all swap files/partitions..." - swapon -a - evaluate_retval - ;; + start) + log_info_msg "Activating all swap files/partitions..." + swapon -a + evaluate_retval + ;; - stop) - boot_mesg "Deactivating all swap files/partitions..." - swapoff -a - evaluate_retval - ;; + stop) + log_info_msg "Deactivating all swap files/partitions..." + swapoff -a + evaluate_retval + ;; - restart) - ${0} stop - sleep 1 - ${0} start - ;; + restart) + ${0} stop + sleep 1 + ${0} start + ;; - status) - boot_mesg "Retrieving swap status." ${INFO} - echo_ok - echo - swapon -s - ;; + status) + log_success_msg "Retrieving swap status." + swapon -s + ;; - *) - echo "Usage: ${0} {start|stop|restart|status}" - exit 1 - ;; + *) + echo "Usage: ${0} {start|stop|restart|status}" + exit 1 + ;; esac -# End $rc_base/init.d/swap +exit 0 + +# End swap