home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Caldera Network Desktop 1.0
/
caldera-network-desktop-1.0.bin
/
images
/
ramdisk2-beta.img
/
etc
/
pcmcia
/
ftl
< prev
next >
Wrap
Text File
|
1995-08-02
|
800b
|
38 lines
#!/bin/sh
#
# ftl.sample 1.2 1995/05/25 04:27:58 (David Hinds)
#
# Initialize or shutdown an FTL memory device
#
# The first argument should be either 'start' or 'stop'. The second
# argument is the base name for the device. When starting a device,
# there should be two additional arguments, the major and minor device
# numbers.
#
# This script creates one block device file, which maps the first
# common memory region.
usage()
{
echo "usage: ftl [action] [device name] [major] [minor]"
exit 1
}
if [ $# -lt 2 ] ; then usage ; fi
action=$1
name=$2
case "${action:?}" in
'start')
if [ $# -ne 4 ] ; then usage ; fi
major=$3
minor=$4
rm -f /dev/${name}*
mknod /dev/${name} b $major $minor
;;
'stop')
fuser -k /dev/${name}*
rm -f /dev/${name}*
;;
esac