summaryrefslogtreecommitdiff
path: root/methods/floppy.setup
diff options
context:
space:
mode:
authorIan Jackson <ian@chiark.chu.cam.ac.uk>1996-04-04 01:58:40 +0100
committerIan Jackson <ian@chiark.chu.cam.ac.uk>1996-04-04 01:58:40 +0100
commit1b80fb16c22db72457d7a456ffbf1f70a8dfc0a5 (patch)
treec0ee53eba4e71f4c246ee9e45fbd90e931bbd1f9 /methods/floppy.setup
downloaddpkg-1b80fb16c22db72457d7a456ffbf1f70a8dfc0a5.tar.gz
dpkg (1.1.4); priority=MEDIUM
* Allow overwriting of conflicting packages being removed. (Bug#2614.) * a.out control file says Pre-Depends: libc4 | libc. (Bug#2640.) * ELF control file and libc dependencies changed to use finalised scheme. * ELF control file and libc dependencies for i386 only. (Bug#2617.) * Guidelines say use only released libraries and compilers. * Install wishlist as /usr/doc/dpkg/WISHLIST. * Remove spurious entries for Guidelines in info dir file. * dpkg-deb --build checks permissions on control (DEBIAN) directory. * Spaces in control file fields not copied by dpkg-split. (Bug#2633.) * Spaces in split file part control data ignore. (Bug#2633.) * Portability fixes, including patch from Richard Kettlewell. * Fixed minor configure.in bug causing mangled GCC -W options. -- Ian Jackson <ian@chiark.chu.cam.ac.uk> Thu, 4 Apr 1996 01:58:40 +0100
Diffstat (limited to 'methods/floppy.setup')
-rw-r--r--methods/floppy.setup76
1 files changed, 76 insertions, 0 deletions
diff --git a/methods/floppy.setup b/methods/floppy.setup
new file mode 100644
index 000000000..8c16cd233
--- /dev/null
+++ b/methods/floppy.setup
@@ -0,0 +1,76 @@
+#!/bin/sh
+
+set -e
+vardir="$1"
+method=$2
+option=$3
+
+cd "$vardir/methods/floppy"
+
+defaultfloppy=fd0
+defaultfstype=msdos
+if [ -f shvar.$option ]
+then
+ . ./shvar.$option
+ defaultfloppy="`echo \"$defaultfloppy\" | sed -e 's,^/dev/,,'`"
+fi
+
+while [ -z "$floppy" ]
+do
+ echo -n '
+Which floppy disk drive do you wish to use ? Give the name in
+/dev (eg fd0) or the MSDOS drive letter (eg A). ['$defaultfloppy'] '
+ read floppy
+ if [ -z "$floppy" ]
+ then
+ floppy="$defaultfloppy"
+ fi
+ case "$floppy" in
+ [ABab] | [ABab]: )
+ floppy="`echo $floppy | \
+ sed -e 's/:$//; s,^[Aa],/dev/fd0,; s,^[Bb],/dev/fd1,'`"
+ ;;
+ /* )
+ ;;
+ * )
+ floppy="/dev/$floppy"
+ ;;
+ esac
+ if ! [ -b "$floppy" ]
+ then
+ echo "$floppy is not a block device."
+ floppy=""
+ fi
+done
+
+while [ -z "$fstype" ]
+do
+ echo -n '
+What kind of filesystem is on the floppies ? ['$defaultfstype'] '
+ read fstype
+ if [ -z "$fstype" ]
+ then
+ fstype="$defaultfstype"
+ fi
+ if ! grep " $fstype$" /proc/filesystems >/dev/null
+ then
+ echo \
+ "Your kernel does not appear to support that filesystem type."
+ fstype=""
+ fi
+done
+
+echo
+
+outputparam () {
+ echo "$2" | sed -e "s/'/'\\\\''/; s/^/$1='/; s/$/'/" >&3
+}
+
+exec 3>shvar.$option.new
+
+outputparam defaultfloppy "$floppy"
+outputparam defaultfstype "$fstype"
+
+mv shvar.$option.new shvar.$option
+
+exit 0