📄 scsi
字号:
#!/bin/sh## scsi 1.30 1997/05/13 02:18:00 (David Hinds)## Initialize or shutdown a PCMCIA SCSI adapter## The first argument should be either 'start' or 'stop'. The second# argument is the base name for the device.## The script passes an extended device address to 'scsi.opts' in the# ADDRESS variable, to retrieve device-specific configuration options.# The address format is "scheme,device,socket,channel,id,lun[,part]"# where "scheme" is the PCMCIA configuration scheme; "device" is the# SCSI device type (sd, sr, st, sg); "socket" is the socket number;# "channel", "id", and "lun" are the SCSI device ID's; and "part" is,# optionally, the partition number.## The script first calls scsi.opts for the entire device. If# scsi.opts returns with the PARTS variable set, then this variable# contains a list of partitions for which options should be read.#if [ -r ./shared ] ; then . ./shared ; else . /etc/pcmcia/shared ; fi# Get device attributesget_info $DEVICEcase "$DEVICE" insd*) TYPE="sd" ;;st*) TYPE="st" ;;scd*) TYPE="sr" ;;sg*) TYPE="sg" ;;esaceval `/sbin/scsi_info /dev/$DEVICE` || usage# Load site-specific settingsADDRESS="$SCHEME,$TYPE,$SOCKET,$SCSI_ID". $0.optscase "$ACTION" in'start') [ -n "$VERBOSE" -a -n "$INFO" ] && echo "$INFO" add_parts $ADDRESS "$PARTS" || exit 1 ;;'stop') if [ -b /dev/$DEVICE ] ; then rm_parts $ADDRESS "$PARTS" else do_fuser -k /dev/$DEVICE > /dev/null fi exit $? ;;'check') is_true $NO_CHECK && exit 0 if [ -b /dev/$DEVICE ] ; then do_fuser -s -m /dev/${DEVICE}* && exit 1 elif [ -c /dev/$DEVICE ] ; then do_fuser -s /dev/${DEVICE}* && exit 1 fi ;;'cksum') chk_parts "$NEW_SCHEME,$TYPE,$SOCKET,$SCSI_ID" || exit 1 ;; 'suspend'|'resume') ;;*) usage ;;esacexit 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -