aboutsummaryrefslogtreecommitdiff
path: root/mkmpiodev
blob: bbe6995b07b5015f7e46d835fe028662e67b6963 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
#------------------------------
# Create device file for MPIO
#------------------------------

DEVFILE=/dev/usb/mpio
MAJOR=180
MINOR=70
PERM=666
OWNER=root.root

if test -c $DEVFILE; then
    echo -n "Removing $DEVFILE ... "
    rm -f $DEVFILE
    echo "done"
fi

if test "$1" != "-r"; then
    echo -n "Creating $DEVFILE ... "
    mknod -m $PERM $DEVFILE c $MAJOR $MINOR
    chown $OWNER $DEVFILE
    echo "done"
fi