diff options
author | crunchy <crunchy> | 2002-09-15 14:55:57 +0000 |
---|---|---|
committer | crunchy <crunchy> | 2002-09-15 14:55:57 +0000 |
commit | 38734679e4a63712715368e95081cd21a2d0d1d1 (patch) | |
tree | 2e463277ffb0a829402970879a7ddb288e264618 /mkmpiodev | |
parent | a9c7d297c5244f6ffc5ac0f977b56f7e19d14cd1 (diff) | |
download | mpiosh-38734679e4a63712715368e95081cd21a2d0d1d1.tar.gz mpiosh-38734679e4a63712715368e95081cd21a2d0d1d1.tar.bz2 mpiosh-38734679e4a63712715368e95081cd21a2d0d1d1.zip |
spec file; fixes
Diffstat (limited to 'mkmpiodev')
-rwxr-xr-x | mkmpiodev | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh #------------------------------ # Create device file for MPIO #------------------------------ @@ -9,11 +9,16 @@ MINOR=70 PERM=666 OWNER=root.root -if [ -a $DEVFILE ]; then - rm -f $DEVFILE +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 -echo -n "Creating $DEVFILE..." -mknod -m $PERM $DEVFILE c $MAJOR $MINOR -chown $OWNER $DEVFILE -echo " done" |