SVN: bootdisk/trunk/scripts/makedev
hawk
hawk at pld-linux.org
Wed Apr 4 23:58:45 CEST 2007
Author: hawk
Date: Wed Apr 4 23:58:45 2007
New Revision: 8424
Modified:
bootdisk/trunk/scripts/makedev
Log:
- don't echo, change dir if second arg was given
Modified: bootdisk/trunk/scripts/makedev
==============================================================================
--- bootdisk/trunk/scripts/makedev (original)
+++ bootdisk/trunk/scripts/makedev Wed Apr 4 23:58:45 2007
@@ -18,20 +18,25 @@
exit 1
fi
+if [ "$2" != "" ]; then
+ cdir=`pwd`
+ cd $2
+fi
+
cat "$1" | while read tDN TYP MJN MIN START INC COUNT SPEC
do
if [ "$TYP" = "l" ]; then
echo "ln -s" $MJN $tDN
ln -s $MJN $tDN
elif [ "$TYP" = "p" ]; then
- echo "mknod " $tDN $TYP
+# echo "mknod " $tDN $TYP
mknod $tDN $TYP
elif ([ "$tDN" = "#" ] || [ "%tDN" = "" ]); then
continue
else
if [ "$COUNT" = "-" ]; then
# make single device
- echo "mknod " $tDN $TYP $MJN $MIN
+# echo "mknod " $tDN $TYP $MJN $MIN
mknod $tDN $TYP $MJN $MIN
else
if [ "$SPEC" = "a" ]; then
@@ -69,7 +74,7 @@
25) xx="z";;
esac
Dn=$tDN$xx
- echo "mknod " $Dn $TYP $MJN $MIN
+# echo "mknod " $Dn $TYP $MJN $MIN
mknod $Dn $TYP $MJN $MIN
let min=MIN+$INC
let b=a+1
@@ -101,7 +106,7 @@
15) xx="f";;
esac
Dn=$tDN$xx
- echo "mknod " $Dn $TYP $MJN $MIN
+# echo "mknod " $Dn $TYP $MJN $MIN
mknod $Dn $TYP $MJN $MIN
let min=MIN+$INC
let b=a+1
@@ -116,7 +121,7 @@
while [ $a -lt $licz ]
do
Dn=$tDN$START
- echo "mknod " $Dn $TYP $MJN $MIN
+# echo "mknod " $Dn $TYP $MJN $MIN
mknod $Dn $TYP $MJN $MIN
let min=MIN+$INC
let b=a+1
@@ -128,3 +133,7 @@
fi
fi
done
+
+if [ "$2" != "" ]; then
+ cd $cdir
+fi
More information about the pld-cvs-commit
mailing list