Debian Codegraph @

tests/inst-2

raw
1 #! /bin/sh
2 # Test the -I option without -r
3 dd if=test-old of=test-mbr 2>/dev/null
4 do_install -I mbr-1.1.2.b -d 0xf0 -t 249 -p 1 -i s -e 3 test-mbr
5 dd if=test-mbr of=test-new 2>/dev/null
6 do_install -lI mbr-1.1.1.b test-new >test-y
7 cat <<EOF >test-x
8 Version: 0
9 Compatible: 0
10 Drive: 0xf0
11 Default: 1
12 Timeout: 249/18 seconds
13 Enabled: 3
14 Interrupt: Shift
15 EOF
16 diff -u test-x test-y
17
18 # The parameters start at 434 and are 4 bytes long.
19 do_cmp mbr-1.1.2.b test-mbr bs=434 count=1
20 do_cmp mbr-1.1.2.b test-mbr bs=1 skip=438 count=74
21
22 # The parameters start at 412 and are 4 bytes long.
23 do_cmp mbr-1.1.1.b test-new bs=1 count=412
24 do_cmp mbr-1.1.1.b test-new bs=1 skip=416 count=96
25
26 dd if=test-mbr bs=1 skip=434 count=1 of=test-x 2>/dev/null
27 dd if=test-new bs=1 skip=412 count=1 of=test-y 2>/dev/null
28 cmp test-x test-y
29
30 # Test -k option
31 do_install -k test-mbr
32 do_cmp mbr-1.1.2.b test-mbr bs=1 count=434
33 do_cmp mbr-1.1.2.b test-mbr bs=1 skip=438 count=74
34 dd if=test-mbr bs=1 skip=434 count=1 of=test-x 2>/dev/null
35 dd if=test-new bs=1 skip=412 count=1 of=test-y 2>/dev/null
36 cmp test-x test-y
37
38 dd if=test-old of=test-mbr 2>/dev/null
39 do_install -d 0xe4 -t 118 -p 3 -i a -e 23 test-mbr
40 dd if=test-mbr of=test-new 2>/dev/null
41 do_install -l test-new >test-y
42 cat <<EOF >test-x
43 Version: 2
44 Compatible: 2
45 Y2K-Fix: Disabled
46 Drive: 0xe4
47 Default: 3
48 Enabled: 2 3
49 Interrupt: Always
50 EOF
51 diff -u test-x test-y
52
53 : Done