blob: 86a43d0b0b73c98ff04cb1e87d2b979c2bf2ee7d (
plain)
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
|
# $OpenBSD: install.md,v 1.4 2003/10/12 13:18:37 krw Exp $
#
# machine dependent section of installation/upgrade script.
#
MDTERM=vt100
MDDISKDEVS='/^sd[0-9] /s/ .*//p'
MDCDDEVS='/^cd[0-9] /s/ .*//p'
ARCH=ARCH
md_set_term() {
}
md_installboot() {
echo -n "Installing boot block..."
/sbin/disklabel -B $1
echo "done."
}
# $1 is the disk to check
md_checkfordisklabel() {
local rval=0
disklabel $1 >/dev/null 2>/tmp/checkfordisklabel
if grep "disk label corrupted" /tmp/checkfordisklabel; then
rval=2
fi >/dev/null 2>&1
rm -f /tmp/checkfordisklabel
return $rval
}
md_prep_disklabel() {
local _disk=$1
md_checkfordisklabel $_disk
case $? in
2) echo "WARNING: Label on disk $_disk is corrupted. You will be repairing it.\n"
;;
esac
disklabel -W $_disk >/dev/null 2>&1
disklabel -f /tmp/fstab.$_disk -E $_disk
}
md_congrats() {
}
|