File: format1440

package info (click to toggle)
xdialog 2.0.6-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,616 kB
  • ctags: 1,064
  • sloc: ansic: 8,505; sh: 4,202; yacc: 318; makefile: 80
file content (22 lines) | stat: -rwxr-xr-x 597 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

# Formats a 1440Kb DOS floppy disk.

TITLE="HD floppy DOS format"

# Change the following variable to suit your system:
DEVICE="/dev/fd0u1440"
MAX_TRACK=79
# This changes depending on your language...
FDFORMAT_MSG_LENGTH=87

fdformat -n $DEVICE | \
Xdialog --title "$TITLE" --no-close \
	--progress "Please wait while low-level formatting...\n\n" 0 0 \
	$MAX_TRACK $FDFORMAT_MSG_LENGTH

( mkdosfs $DEVICE 2>/dev/null ; echo "XXXX" ) |
Xdialog --title "$TITLE" --no-close --no-buttons \
	--infobox "Making the DOS filesystem..." 0 0 0

Xdialog --title "$TITLE" --msgbox "All done !" 0 0