#!/bin/sh # # ftl 1.17 1997/03/18 06:47:42 (David Hinds) # # Initialize or shutdown an FTL memory device # # The first argument should be the action to be performed, and the # second, the base name for the device. # # The script passes an extended device address to 'ftl.opts' in the # ADDRESS variable, to retrieve device-specific configuration options. # The address format is "scheme,socket,instance" where "scheme" is the # current PCMCIA configuration scheme, "socket" is the socket number, # and "instance" is used to number multiple partitions on a single # card. # . ./shared # Get device attributes get_info $DEVICE # Load site-specific settings ADDRESS="$SCHEME,$SOCKET,$INSTANCE" . ./ftl.opts case "$ACTION" in 'start') rm -f /dev/$DEVICE mknod /dev/$DEVICE b $MAJOR $MINOR add_blkdev /dev/$DEVICE || exit 1 ;; 'check') fuser -s -m /dev/$DEVICE && exit 1 ;; 'stop') rm_blkdev /dev/$DEVICE || exit 1 rm -f /dev/$DEVICE ;; 'suspend'|'resume') ;; *) usage ;; esac exit 0