Magellan Linux

Contents of /branches/unlabeled-1.1.1/udev/config-udev-046-r3/floppy-extra-devs.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations) (download) (as text)
Fri Dec 10 12:17:31 2004 UTC (19 years, 3 months ago) by niro
File MIME type: application/x-sh
File size: 849 byte(s)
magellan sources, patches

1 #!/bin/sh
2 # floppy-extra-devs.sh
3 # by volkerdi at slackware dot com
4 # some simple mods by niro@magellan-linux.de
5
6 # This is a handy pseudo-expr picked up from the MAKEDEV script:
7 math() {
8 eval echo "\$(($*))"
9 }
10
11 # Add extra floppy devices (used only by fdformat, I think)
12 FLOPNUM=`echo $1 | cut -b 3`
13 for devpair in \
14 d360:4 \
15 h360:20 h720:24 h880:80 h1200:8 h1440:40 h1476:56 h1494:72 h1600:92 \
16 u1440:28 u1600:124 u1680:44 u1722:60 u1743:76 u1760:96 u1840:116 u1920:100 \
17 u2880:32 u3200:104 u3520:108 u3840:112 ; do
18 FLOPDEV=`echo $devpair | cut -f 1 -d :`
19 FLOPNOD=`echo $devpair | cut -f 2 -d :`
20 if [ -e /dev/${1}${FLOPDEV} ]
21 then
22 rm /dev/${1}${FLOPDEV}
23 fi
24 mknod /dev/${1}${FLOPDEV} b 2 `math $FLOPNOD + $FLOPNUM`
25 chown root:floppy /dev/${1}${FLOPDEV}
26 chmod 660 /dev/${1}${FLOPDEV}
27 done
28 unset FLOPNUM FLOPDEV FLOPNOD devpair math

Properties

Name Value
svn:executable *