]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - etc/rc.d/archdep
Stop method for swap1 script was introduced, because gmirror needed it.
[FreeBSD/FreeBSD.git] / etc / rc.d / archdep
1 #!/bin/sh
2 #
3 # $FreeBSD$
4 #
5
6 # PROVIDE: archdep
7 # REQUIRE: LOGIN
8 # BEFORE: abi
9 # KEYWORD: nojail
10
11 . /etc/rc.subr
12
13 name=archdep
14 load_rc_config $name
15
16 # should we print out unaligned access warnings?
17 #
18 unaligned_warnings()
19 {
20         if ! checkyesno unaligned_print; then
21                 sysctl machdep.unaligned_print=0
22         fi
23 }
24
25 # Alpha OSF/1 binary emulation
26 #
27 osf1_compat()
28 {
29         if checkyesno osf1_enable; then
30                 echo -n ' OSF/1'
31                 if ! kldstat -v | grep osf1_ecoff > /dev/null; then
32                         kldload osf1 > /dev/null 2>&1
33                 fi
34         fi
35 }
36
37 # SCO binary emulation
38 #
39 ibcs2_compat()
40 {
41         if checkyesno ibcs2_enable; then
42                 echo -n ' ibcs2'
43                 kldload ibcs2 > /dev/null 2>&1
44                 case ${ibcs2_loaders} in
45                 [Nn][Oo])
46                         ;;
47                 *)
48                         for i in ${ibcs2_loaders}; do
49                                 kldload ibcs2_$i > /dev/null 2>&1
50                         done
51                         ;;
52                 esac
53         fi
54 }
55
56 _arch=`${SYSCTL_N} hw.machine`
57 echo -n "Initial $_arch initialization:"
58 case $_arch in
59 i386)
60         ibcs2_compat
61         ;;
62 alpha)
63         osf1_compat
64         unaligned_warnings
65         ;;
66 ia64)
67         unaligned_warnings
68         ;;
69 esac
70 echo '.'