⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 initscript

📁 Cryptmount是对Linux系统下的文件系统以及用户设备、文档等进行加密的系统.
💻
字号:
#!/bin/sh# boot-time init script for cryptmount# $Revision: 125 $, $Date: 2006-09-22 20:39:18 +0100 (Fri, 22 Sep 2006) $# RW Penney, August 2006# Basic support for Linux Standard Base:### BEGIN INIT INFO# Provides:		cryptmount# Required-Start:	$syslog# Required-Stop:	$syslog# Should-Start:		$local_fs# Should-Stop:		$local_fs# Default-Start:	2 3 4 5# Default-Stop:		0 1 6# Short-Description:	setup encrypted filesystems/swap at boot# Description:		configure device-mapper targets for encrypted#			filesystems and swap-partitions managed by cryptmount### END INIT INFOCM_EXE=/usr/bin/cryptmountDMPATH=/dev/mapperCM_BOOTDV=""CM_BOOTSW=""CM_BOOTFS=""test -x "${CM_EXE}" || exit 5if [ -f /etc/default/cryptmount ]; then    . /etc/default/cryptmountficonfigured() {    # check if any of the targets needed at boot has been configured:    for target in ${CM_BOOTDV} ${CM_BOOTFS} ${CM_BOOTSW}; do        if [ -b "${DMPATH}/${target}" ]; then            true            return        fi    done    false}dodevices() {    case "$1" in        start)  test -z "${CM_BOOTDV}" || ${CM_EXE} --prepare ${CM_BOOTDV}            ;;        stop)   test -z "${CM_BOOTDV}" || ${CM_EXE} --release ${CM_BOOTDV}            ;;    esac}doswaps() {    case "$1" in        start)  test -z "${CM_BOOTSW}" || ${CM_EXE} --swapon ${CM_BOOTSW}            ;;        stop)   test -z "${CM_BOOTSW}" || ${CM_EXE} --swapoff ${CM_BOOTSW}            ;;    esac}dofilesys() {    case "$1" in        start)  test -z "${CM_BOOTFS}" || ${CM_EXE} --mount ${CM_BOOTFS}            ;;        stop)   test -z "${CM_BOOTFS}" || ${CM_EXE} --unmount ${CM_BOOTFS}            ;;    esac}doALL() {    case "$1" in        start)            dodevices start            doswaps start            dofilesys start            ;;        stop)            dofilesys stop            doswaps stop            dodevices stop            ;;    esac}case "$1" in    start)        if configured; then            echo "cryptmount auto-filesystems seem to be already configured"        else            echo "Starting cryptmount targets (hit shift/ctrl if short of entropy):"            doALL start        fi        ;;    stop)        if configured; then            echo "Stopping cryptmount targets:"            doALL stop        fi        ;;    restart)        if configured; then            doALL stop        fi        doALL start        ;;    force-reload|reload)        # nothing to do        ;;    status)        if configured; then            echo "cryptmount auto-filesystems are in use"        else            echo "cryptmount auto-filesystems do not appear to be in use"            exit 3        fi        ;;    *)        echo "Usage: /etc/init.d/cryptmount " \            " {start|stop|restart|reload|force-reload|status}" >&2        exit 1        ;;esacexit 0

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -