3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <https://www.gnu.org/licenses/>.
21 cd "$vardir/methods/floppy"
25 if [ -f shvar.$option ]
28 defaultfloppy="`echo \"$defaultfloppy\" | sed -e 's,^/dev/,,'`"
31 while [ -z "$floppy" ]
34 Which floppy disk drive do you wish to use ? Give the name in
35 /dev (eg fd0) or the MSDOS drive letter (eg A). ['$defaultfloppy'] '
39 floppy="$defaultfloppy"
43 floppy="`echo $floppy | \
44 sed -e 's/:$//; s,^[Aa],/dev/fd0,; s,^[Bb],/dev/fd1,'`"
54 echo "$floppy is not a block device."
59 while [ -z "$fstype" ]
62 What kind of filesystem is on the floppies ? ['$defaultfstype'] '
66 fstype="$defaultfstype"
68 if ! grep " $fstype$" /proc/filesystems >/dev/null
71 "Your kernel does not appear to support that filesystem type."
79 echo "$2" | sed -e "s/'/'\\\\''/; s/^/$1='/; s/$/'/" >&3
82 exec 3>shvar.$option.new
84 outputparam defaultfloppy "$floppy"
85 outputparam defaultfstype "$fstype"
87 mv shvar.$option.new shvar.$option