rc revision 76430
1#!/bin/sh 2# 3# Copyright (c) 2000 The FreeBSD Project 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: 9# 1. Redistributions of source code must retain the above copyright 10# notice, this list of conditions and the following disclaimer. 11# 2. Redistributions in binary form must reproduce the above copyright 12# notice, this list of conditions and the following disclaimer in the 13# documentation and/or other materials provided with the distribution. 14# 15# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# 27# $FreeBSD: head/etc/rc 76430 2001-05-10 09:25:10Z brian $ 28# From: @(#)rc 5.27 (Berkeley) 6/5/91 29# 30 31# System startup script run by init on autoboot 32# or after single-user. 33# Output and error are redirected to console by init, 34# and the console is the controlling terminal. 35 36# Note that almost all of the user-configurable behavior is no longer in 37# this file, but rather in /etc/defaults/rc.conf. Please check that file 38# first before contemplating any changes here. If you do need to change 39# this file for some reason, we would like to know about it. 40 41stty status '^T' 42 43# Set shell to ignore SIGINT (2), but not children; 44# shell catches SIGQUIT (3) and returns to single user after fsck. 45# 46trap : 2 47trap : 3 # shouldn't be needed 48 49bootmode=$1 50 51HOME=/ 52PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin 53export HOME PATH 54 55# BOOTP diskless boot. We have to run the rc file early in order to 56# retarget various config files. 57# 58if [ -r /etc/rc.diskless1 ]; then 59 dlv=`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null` 60 if [ ${dlv:=0} != 0 ]; then 61 . /etc/rc.diskless1 62 fi 63fi 64 65# If there is a global system configuration file, suck it in. 66# 67if [ -r /etc/defaults/rc.conf ]; then 68 . /etc/defaults/rc.conf 69 source_rc_confs 70elif [ -r /etc/rc.conf ]; then 71 . /etc/rc.conf 72fi 73 74feed_dev_random() { 75 if [ -f "${1}" -a -r "${1}" -a -s "${1}" ]; then 76 echo "Using ${1} as an entropy file" 77 cat "${1}" | dd of=/dev/random bs=8k 2>/dev/null 78 fi 79} 80 81chkdepend() { 82 svc=$1 83 svc_var=$2 84 dep=$3 85 dep_var=$4 86 87 eval svc_val=\${$svc_var} 88 eval dep_val=\${$dep_var} 89 90 case ${svc_val} in 91 [Yy][Ee][Ss]) 92 case ${dep_val} in 93 [Yy][Ee][Ss]) 94 ;; 95 *) 96 eval ${dep_var}="YES" 97 echo "DEPENDENCY NOTE: ${dep} will be enabled" \ 98 "to support ${svc}" 99 ;; 100 esac 101 ;; 102 esac 103} 104 105chkdepend amd amd_enable portmap portmap_enable 106chkdepend NFS nfs_server_enable portmap portmap_enable 107chkdepend NIS nis_server_enable portmap portmap_enable 108chkdepend NIS nis_client_enable portmap portmap_enable 109 110# Enable harvesting of entropy via devices. The sooner this happens the 111# better so that we can take advantage of the boot process. 112# 113echo -n 'Entropy harvesting:' 114 115case ${harvest_interrupt} in 116[Nn][Oo]) 117 ;; 118*) 119 if [ -w /dev/random ]; then 120 /sbin/sysctl -w kern.random.sys.harvest.interrupt=1 >/dev/null 121 echo -n ' interrupts' 122 fi 123 ;; 124esac 125 126case ${harvest_ethernet} in 127[Nn][Oo]) 128 ;; 129*) 130 if [ -w /dev/random ]; then 131 /sbin/sysctl -w kern.random.sys.harvest.ethernet=1 >/dev/null 132 echo -n ' ethernet' 133 fi 134 ;; 135esac 136 137case ${harvest_p_to_p} in 138[Nn][Oo]) 139 ;; 140*) 141 if [ -w /dev/random ]; then 142 /sbin/sysctl -w kern.random.sys.harvest.point_to_point=1 >/dev/null 143 echo -n ' point_to_point' 144 fi 145 ;; 146esac 147 148echo '.' 149 150# First pass at reseeding /dev/random. 151# 152case ${entropy_file} in 153[Nn][Oo] | '') 154 ;; 155*) 156 if [ -w /dev/random ]; then 157 feed_dev_random "${entropy_file}" 158 fi 159 ;; 160esac 161 162# XXX temporary until we can get the entropy 163# harvesting rate up 164# Entropy below is not great, 165# but better than nothing. 166( ps -efauxww; sysctl -a; date; df -ib; dmesg; ps -efauxww; ) \ 167 | dd of=/dev/random bs=8k 2>/dev/null 168cat /bin/ls | dd of=/dev/random bs=8k 2>/dev/null 169 170# Configure ccd devices. 171# 172if [ -r /etc/ccd.conf ]; then 173 ccdconfig -C 174fi 175 176case ${start_vinum} in 177[Yy][Ee][Ss]) 178 vinum start 179 ;; 180esac 181 182swapon -a 183 184case ${bootmode} in 185autoboot) 186 echo 'Automatic boot in progress...' 187 fsck -p 188 case $? in 189 0) 190 ;; 191 2) 192 exit 1 193 ;; 194 4) 195 reboot 196 echo 'Reboot failed... help!' 197 exit 1 198 ;; 199 8) 200 case ${fsck_y_enable} in 201 [Yy][Ee][Ss]) 202 echo 'File system preen failed, trying fsck -y . . .' 203 fsck -y 204 case $? in 205 0) 206 ;; 207 *) 208 echo 'Automatic file system check failed . . . help!' 209 exit 1 210 ;; 211 esac 212 ;; 213 *) 214 echo 'Automatic file system check failed . . . help!' 215 exit 1 216 ;; 217 esac 218 ;; 219 12) 220 echo 'Reboot interrupted' 221 exit 1 222 ;; 223 130) 224 # interrupt before catcher installed 225 exit 1 226 ;; 227 *) 228 echo 'Unknown error in reboot' 229 exit 1 230 ;; 231 esac 232 ;; 233*) 234 echo 'Skipping disk checks ...' 235 ;; 236esac 237 238set -T 239trap "echo 'Reboot interrupted'; exit 1" 3 240 241# root normally must be read/write, but if this is a BOOTP NFS 242# diskless boot it does not have to be. 243# 244case ${root_rw_mount} in 245[Nn][Oo] | '') 246 ;; 247*) 248 if ! mount -u -o rw / ; then 249 echo 'Mounting root filesystem rw failed, startup aborted' 250 exit 1 251 fi 252 ;; 253esac 254 255umount -a >/dev/null 2>&1 256 257# Mount everything except nfs filesystems. 258mount -a -t nonfs 259 260case $? in 2610) 262 ;; 263*) 264 echo 'Mounting /etc/fstab filesystems failed, startup aborted' 265 exit 1 266 ;; 267esac 268 269# Run custom disk mounting function here 270# 271if [ -n "${diskless_mount}" -a -r "${diskless_mount}" ]; then 272 sh ${diskless_mount} 273fi 274 275# Reseed /dev/random with previously stored entropy. 276case ${entropy_dir} in 277[Nn][Oo]) 278 ;; 279*) 280 entropy_dir=${entropy_dir:-/var/db/entropy} 281 if [ -d "${entropy_dir}" ]; then 282 if [ -w /dev/random ]; then 283 for seedfile in ${entropy_dir}/*; do 284 feed_dev_random "${seedfile}" 285 done 286 fi 287 fi 288 ;; 289esac 290 291case ${entropy_file} in 292[Nn][Oo] | '') 293 ;; 294*) 295 if [ -w /dev/random ]; then 296 feed_dev_random "${entropy_file}" 297 fi 298 ;; 299esac 300 301adjkerntz -i 302 303purgedir() { 304 local dir file 305 306 if [ $# -eq 0 ]; then 307 purgedir . 308 else 309 for dir 310 do 311 ( 312 cd "$dir" && for file in .* * 313 do 314 [ ."$file" = .. -o ."$file" = ... ] && continue 315 if [ -d "$file" -a ! -L "$file" ] 316 then 317 purgedir "$file" 318 else 319 rm -f -- "$file" 320 fi 321 done 322 ) 323 done 324 fi 325} 326 327clean_var() { 328 if [ ! -f /var/run/clean_var ]; then 329 purgedir /var/run /var/spool/lock 330 rm -rf /var/spool/uucp/.Temp/* 331 # Keep a copy of the boot messages around 332 dmesg >/var/run/dmesg.boot 333 # And an initial utmp file 334 (cd /var/run && cp /dev/null utmp && chmod 644 utmp;) 335 >/var/run/clean_var 336 fi 337} 338 339if [ -d /var/run -a -d /var/spool/lock -a -d /var/spool/uucp/.Temp ]; then 340 # network_pass1() *may* end up writing stuff to /var - we don't want to 341 # remove it immediately afterwards - *nor* to we want to fail to clean 342 # an nfs-mounted /var. 343 clean_var 344fi 345 346# Add additional swapfile, if configured. 347# 348case ${swapfile} in 349[Nn][Oo] | '') 350 ;; 351*) 352 if [ -w "${swapfile}" -a -c /dev/mdctl ]; then 353 echo "Adding ${swapfile} as additional swap" 354 mdev=`mdconfig -a -t vnode -f ${swapfile}` && swapon /dev/${mdev} 355 fi 356 ;; 357esac 358 359# Set sysctl variables as early as we can 360# 361if [ -r /etc/rc.sysctl ]; then 362 . /etc/rc.sysctl 363fi 364 365# Configure serial devices 366# 367if [ -r /etc/rc.serial ]; then 368 . /etc/rc.serial 369fi 370 371# Start up PC-card configuration 372# 373if [ -r /etc/rc.pccard ]; then 374 . /etc/rc.pccard 375fi 376 377# Start up the initial network configuration. 378# 379if [ -r /etc/rc.network ]; then 380 . /etc/rc.network # We only need to do this once. 381 network_pass1 382fi 383 384case ${ipv6_enable} in 385[Yy][Ee][Ss]) 386 if [ -r /etc/rc.network6 ]; then 387 . /etc/rc.network6 # We only need to do this once also. 388 network6_pass1 389 fi 390 ;; 391esac 392 393# Mount NFS filesystems if present in /etc/fstab 394case "`mount -d -a -t nfs`" in 395*mount_nfs*) 396 echo -n 'Mounting NFS file systems:' 397 mount -a -t nfs 398 echo '.' 399 ;; 400esac 401 402# Whack the pty perms back into shape. 403# 404if ls /dev/tty[pqrsPQRS]* > /dev/null 2>&1; then 405 chflags 0 /dev/tty[pqrsPQRS]* 406 chmod 666 /dev/tty[pqrsPQRS]* 407 chown root:wheel /dev/tty[pqrsPQRS]* 408fi 409 410# Clean up left-over files 411# 412clean_var # If it hasn't already been done 413rm /var/run/clean_var 414 415# Clearing /tmp at boot-time seems to have a long tradition. It doesn't 416# help in any way for long-living systems, and it might accidentally 417# clobber files you would rather like to have preserved after a crash 418# (if not using mfs /tmp anyway). 419# 420# See also the example of another cleanup policy in /etc/periodic/daily. 421# 422case ${clear_tmp_enable} in 423[Yy][Ee][Ss]) 424 echo -n 'Clearing /tmp:' 425 # prune quickly with one rm, then use find to clean up /tmp/[lq]* 426 # (not needed with mfs /tmp, but doesn't hurt there...) 427 (cd /tmp && rm -rf [a-km-pr-zA-Z]* && 428 find -d . ! -name . ! -name lost+found ! -name quota.user \ 429 ! -name quota.group -exec rm -rf -- {} \;) 430 echo '.' 431 ;; 432esac 433 434# Remove X lock files, since they will prevent you from restarting X11 435# after a system crash. 436# 437rm -f /tmp/.X*-lock /tmp/.X11-unix/* 438 439# Snapshot any kernel -c changes back to disk here <someday>. 440# This has changed with ELF and /kernel.config. 441 442echo -n 'Additional daemons:' 443 444# Start system logging and name service. Named needs to start before syslogd 445# if you don't have a /etc/resolv.conf. 446# 447case ${syslogd_enable} in 448[Yy][Ee][Ss]) 449 # Transitional symlink (for the next couple of years :) until all 450 # binaries have had a chance to move towards /var/run/log. 451 if [ ! -L /dev/log ]; then 452 # might complain for r/o root f/s 453 ln -sf /var/run/log /dev/log 454 fi 455 456 rm -f /var/run/log 457 echo -n ' syslogd'; syslogd ${syslogd_flags} 458 ;; 459esac 460 461echo '.' 462 463# Build device name databases if we are not using DEVFS 464# 465if sysctl vfs.devfs.generation > /dev/null 2>&1 ; then 466 rm -f /var/run/dev.db 467else 468 dev_mkdb 469fi 470 471# Enable dumpdev so that savecore can see it. 472# /var/crash should be a directory or a symbolic link 473# to the crash directory if core dumps are to be saved. 474# 475case ${dumpdev} in 476[Nn][Oo] | '') 477 ;; 478*) 479 if [ -e "${dumpdev}" -a -d /var/crash ]; then 480 /sbin/dumpon -v ${dumpdev} 481 echo -n 'Checking for core dump: ' 482 /sbin/savecore ${savecore_flags} /var/crash 483 fi 484 ;; 485esac 486 487if [ -n "${network_pass1_done}" ]; then 488 network_pass2 489fi 490 491# Enable/Check the quotas (must be after ypbind if using NIS) 492# 493case ${enable_quotas} in 494[Yy][Ee][Ss]) 495 case ${check_quotas} in 496 [Yy][Ee][Ss]) 497 echo -n 'Checking quotas:' 498 quotacheck -a 499 echo ' done.' 500 ;; 501 esac 502 503 echo -n 'Enabling quotas:' 504 quotaon -a 505 echo ' done.' 506 ;; 507esac 508 509if [ -n "${network_pass2_done}" ]; then 510 network_pass3 511fi 512 513# Check the password temp/lock file 514# 515if [ -e /etc/ptmp ]; then 516 logger -s -p auth.err \ 517 "password file may be incorrect -- /etc/ptmp exists" 518fi 519 520case ${accounting_enable} in 521[Yy][Ee][Ss]) 522 if [ -d /var/account ]; then 523 echo 'Turning on accounting:' 524 if [ ! -e /var/account/acct ]; then 525 touch /var/account/acct 526 fi 527 accton /var/account/acct 528 fi 529 ;; 530esac 531 532# Make shared lib searching a little faster. Leave /usr/lib first if you 533# add your own entries or you may come to grief. 534# 535ldconfig="/sbin/ldconfig" 536case ${ldconfig_insecure} in 537[Yy][Ee][Ss]) 538 ldconfig="${ldconfig} -i" 539 ;; 540esac 541if [ -x /sbin/ldconfig ]; then 542 case `/usr/bin/objformat` in 543 elf) 544 _LDC=/usr/lib 545 for i in ${ldconfig_paths}; do 546 if [ -d "${i}" ]; then 547 _LDC="${_LDC} ${i}" 548 fi 549 done 550 echo 'ELF ldconfig path:' ${_LDC} 551 ${ldconfig} -elf ${_LDC} 552 ;; 553 esac 554 555 # Legacy aout support for i386 only 556 case `sysctl -n hw.machine` in 557 i386) 558 # Default the a.out ldconfig path. 559 : ${ldconfig_paths_aout=${ldconfig_paths}} 560 _LDC=/usr/lib/aout 561 for i in ${ldconfig_paths_aout}; do 562 if [ -d "${i}" ]; then 563 _LDC="${_LDC} ${i}" 564 fi 565 done 566 echo 'a.out ldconfig path:' ${_LDC} 567 ${ldconfig} -aout ${_LDC} 568 ;; 569 esac 570fi 571 572# Now start up miscellaneous daemons that don't belong anywhere else 573# 574echo -n 'Starting standard daemons:' 575case ${inetd_enable} in 576[Nn][Oo]) 577 ;; 578*) 579 echo -n ' inetd'; inetd ${inetd_flags} 580 ;; 581esac 582 583case ${cron_enable} in 584[Nn][Oo]) 585 ;; 586*) 587 echo -n ' cron'; ${cron_program:-/usr/sbin/cron} ${cron_flags} 588 ;; 589esac 590 591case ${lpd_enable} in 592[Yy][Ee][Ss]) 593 echo -n ' printer'; ${lpd_program:-/usr/sbin/lpd} ${lpd_flags} 594 ;; 595esac 596 597case ${sshd_enable} in 598[Yy][Ee][Ss]) 599 if [ -x ${sshd_program:-/usr/sbin/sshd} ]; then 600 echo -n ' sshd'; 601 ${sshd_program:-/usr/sbin/sshd} ${sshd_flags} 602 fi 603 ;; 604esac 605 606case ${usbd_enable} in 607[Yy][Ee][Ss]) 608 echo -n ' usbd'; /usr/sbin/usbd ${usbd_flags} 609 ;; 610esac 611 612if [ -r /etc/mail/sendmail.cf ]; then 613 case ${sendmail_enable} in 614 [Yy][Ee][Ss]) 615 echo -n ' sendmail' 616 /usr/sbin/sendmail ${sendmail_flags} 617 ;; 618 *) 619 case ${sendmail_outbound_enable} in 620 [Yy][Ee][Ss]) 621 echo -n ' sendmail' 622 /usr/sbin/sendmail ${sendmail_outbound_flags} 623 ;; 624 esac 625 ;; 626 esac 627fi 628 629echo '.' 630 631# Recover vi editor files. 632find /var/tmp/vi.recover ! -type f -a ! -type d -delete 633vibackup=`echo /var/tmp/vi.recover/vi.*` 634if [ "${vibackup}" != '/var/tmp/vi.recover/vi.*' ]; then 635 echo -n 'Recovering vi editor sessions:' 636 for i in /var/tmp/vi.recover/vi.*; do 637 # Only test files that are readable. 638 if [ ! -r "${i}" ]; then 639 continue 640 fi 641 642 # Unmodified nvi editor backup files either have the 643 # execute bit set or are zero length. Delete them. 644 if [ -x "${i}" -o ! -s "${i}" ]; then 645 rm -f "${i}" 646 fi 647 done 648 649 # It is possible to get incomplete recovery files, if the editor 650 # crashes at the right time. 651 virecovery=`echo /var/tmp/vi.recover/recover.*` 652 if [ "${virecovery}" != "/var/tmp/vi.recover/recover.*" ]; then 653 for i in /var/tmp/vi.recover/recover.*; do 654 # Only test files that are readable. 655 if [ ! -r "${i}" ]; then 656 continue 657 fi 658 659 # Delete any recovery files that are zero length, 660 # corrupted, or that have no corresponding backup file. 661 # Else send mail to the user. 662 recfile=`awk '/^X-vi-recover-path:/{print $2}' < "${i}"` 663 if [ -n "${recfile}" -a -s "${recfile}" ]; then 664 sendmail -t < "${i}" 665 else 666 rm -f "${i}" 667 fi 668 done 669 fi 670 echo '.' 671fi 672 673# Make a bounds file for msgs(1) if there isn't one already 674# 675if [ -d /var/msgs -a ! -f /var/msgs/bounds -a ! -L /var/msgs/bounds ]; then 676 echo 0 > /var/msgs/bounds 677fi 678 679case ${update_motd} in 680[Nn][Oo] | '') 681 ;; 682*) 683 if T=`mktemp /tmp/_motd.XXXXXX`; then 684 uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 (\3) #\2,' > ${T} 685 awk '{if (NR == 1) {if ($1 == "FreeBSD") {next} else {print "\n"$0}} else {print}}' < /etc/motd >> ${T} 686 cmp -s ${T} /etc/motd || { 687 cp ${T} /etc/motd 688 chmod 644 /etc/motd 689 } 690 rm -f ${T} 691 fi 692 ;; 693esac 694 695# Configure implementation specific stuff 696# 697arch=`uname -m` 698if [ -r /etc/rc.${arch} ]; then 699 . /etc/rc.${arch} 700fi 701 702# Configure the system console 703# 704if [ -r /etc/rc.syscons ]; then 705 . /etc/rc.syscons 706fi 707 708# Run rc.devfs if readable to customize devfs 709# 710if [ -r /etc/rc.devfs ]; then 711 sh /etc/rc.devfs 712fi 713 714echo -n 'Additional ABI support:' 715 716# Load the SysV IPC API if requested. 717case ${sysvipc_enable} in 718[Yy][Ee][Ss]) 719 echo -n ' sysvipc' 720 kldload sysvmsg >/dev/null 2>&1 721 kldload sysvsem >/dev/null 2>&1 722 kldload sysvshm >/dev/null 2>&1 723 ;; 724esac 725 726# Start the Linux binary compatibility if requested. 727# 728case ${linux_enable} in 729[Yy][Ee][Ss]) 730 echo -n ' linux' 731 if ! kldstat -v | grep -E 'linux(aout|elf)' > /dev/null; then 732 kldload linux > /dev/null 2>&1 733 fi 734 if [ -x /compat/linux/sbin/ldconfig ]; then 735 /compat/linux/sbin/ldconfig 736 fi 737 ;; 738esac 739 740# Start the SysVR4 binary emulation if requested. 741# 742case ${svr4_enable} in 743[Yy][Ee][Ss]) 744 echo -n ' svr4'; 745 kldload streams > /dev/null 2>&1 746 kldload svr4 > /dev/null 2>&1 747 ;; 748esac 749 750echo '.' 751 752# Do traditional (but rather obsolete) rc.local file if it exists. If you 753# use this file and want to make it programmatic, source /etc/defaults/rc.conf 754# in /etc/rc.local and add your custom variables to /etc/rc.conf, as 755# shown below. Please do not put local extensions into /etc/rc itself. 756# Use /etc/rc.local 757# 758# ---- rc.local ---- 759# if [ -r /etc/defaults/rc.conf ]; then 760# . /etc/defaults/rc.conf 761# source_rc_confs 762# elif [ -r /etc/rc.conf ]; then 763# . /etc/rc.conf 764# fi 765# 766# ... additional startup conditionals ... 767# ---- rc.local ---- 768# 769if [ -r /etc/rc.local ]; then 770 echo -n 'Starting local daemons:' 771 sh /etc/rc.local 772 echo '.' 773fi 774 775# For each valid dir in $local_startup, search for init scripts matching *.sh 776# 777case ${local_startup} in 778[Nn][Oo] | '') 779 ;; 780*) 781 echo -n 'Local package initialization:' 782 for dir in ${local_startup}; do 783 if [ -d "${dir}" ]; then 784 for script in ${dir}/*.sh; do 785 if [ -x "${script}" ]; then 786 (set -T 787 trap 'exit 1' 2 788 ${script} start) 789 fi 790 done 791 fi 792 done 793 echo '.' 794 ;; 795esac 796 797if [ -n "${network_pass3_done}" ]; then 798 network_pass4 799fi 800 801# Raise kernel security level. This should be done only after `fsck' has 802# repaired local file systems if you want the securelevel to be greater than 1. 803# 804case ${kern_securelevel_enable} in 805[Yy][Ee][Ss]) 806 if [ "${kern_securelevel}" -ge 0 ]; then 807 echo 'Raising kernel security level: ' 808 sysctl -w kern.securelevel=${kern_securelevel} 809 fi 810 ;; 811esac 812 813echo '' 814 815date 816 817exit 0 818 819