archdep revision 150691
1#!/bin/sh 2# 3# $FreeBSD: head/etc/rc.d/archdep 150691 2005-09-28 16:24:47Z yar $ 4# 5 6# PROVIDE: archdep 7# REQUIRE: LOGIN 8# BEFORE: abi 9# KEYWORD: nojail 10 11. /etc/rc.subr 12 13name=archdep 14start_cmd="archdep_start" 15stop_cmd=":" 16 17# should we print out unaligned access warnings? 18# 19unaligned_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# 28osf1_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# 40ibcs2_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 57archdep_start() 58{ 59 _arch=`${SYSCTL_N} hw.machine` 60 echo -n "Initial $_arch initialization:" 61 case $_arch in 62 i386) 63 ibcs2_compat 64 ;; 65 alpha) 66 osf1_compat 67 unaligned_warnings 68 ;; 69 ia64) 70 unaligned_warnings 71 ;; 72 esac 73 echo '.' 74} 75 76load_rc_config $name 77run_rc_command "$1" 78