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