File: inst-2

package info (click to toggle)
mbr 1.1.5-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 384 kB
  • ctags: 293
  • sloc: ansic: 2,151; sh: 762; makefile: 116
file content (53 lines) | stat: -rwxr-xr-x 1,386 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#! /bin/sh
# Test the -I option without -r
dd if=test-old of=test-mbr 2>/dev/null
do_install -I mbr-1.1.2.b -d 0xf0 -t 249 -p 1 -i s -e 3 test-mbr
dd if=test-mbr of=test-new 2>/dev/null
do_install -lI mbr-1.1.1.b test-new >test-y
cat <<EOF >test-x
Version: 0
Compatible: 0
Drive: 0xf0
Default: 1
Timeout: 249/18 seconds
Enabled: 3
Interrupt: Shift
EOF
diff -u test-x test-y

# The parameters start at 434 and are 4 bytes long.
do_cmp mbr-1.1.2.b test-mbr bs=434 count=1
do_cmp mbr-1.1.2.b test-mbr bs=1 skip=438 count=74

# The parameters start at 412 and are 4 bytes long.
do_cmp mbr-1.1.1.b test-new bs=1 count=412
do_cmp mbr-1.1.1.b test-new bs=1 skip=416 count=96

dd if=test-mbr bs=1 skip=434 count=1 of=test-x 2>/dev/null
dd if=test-new bs=1 skip=412 count=1 of=test-y 2>/dev/null
cmp test-x test-y

# Test -k option
do_install -k test-mbr
do_cmp mbr-1.1.2.b test-mbr bs=1 count=434
do_cmp mbr-1.1.2.b test-mbr bs=1 skip=438 count=74
dd if=test-mbr bs=1 skip=434 count=1 of=test-x 2>/dev/null
dd if=test-new bs=1 skip=412 count=1 of=test-y 2>/dev/null
cmp test-x test-y

dd if=test-old of=test-mbr 2>/dev/null
do_install -d 0xe4 -t 118 -p 3 -i a -e 23 test-mbr
dd if=test-mbr of=test-new 2>/dev/null
do_install -l test-new >test-y
cat <<EOF >test-x
Version: 2
Compatible: 2
Y2K-Fix: Disabled
Drive: 0xe4
Default: 3
Enabled: 2 3
Interrupt: Always
EOF
diff -u test-x test-y

: Done