#!/bin/sh
# This script opens a node at run time. It gets the major
# no of the megadev and then opens a node with the major number.
# If the node is already present, it removes the node first
# and then creates a fresh node.
# Get the major number of the megadev ioctl node
MAJOR=`grep megadev /proc/devices|awk '{print $1}'`
if [ ! x$MAJOR = x ]
then
# major device number found
rm -f /dev/megadev0 # remove if already there, ignore if not.
mknod /dev/megadev0 c $MAJOR 0
fi
# This script opens a node at run time. It gets the major
# no of the megadev and then opens a node with the major number.
# If the node is already present, it removes the node first
# and then creates a fresh node.
# Get the major number of the megadev ioctl node
MAJOR=`grep megadev /proc/devices|awk '{print $1}'`
if [ ! x$MAJOR = x ]
then
# major device number found
rm -f /dev/megadev0 # remove if already there, ignore if not.
mknod /dev/megadev0 c $MAJOR 0
fi