1# $NetBSD: rc.subr,v 1.67 2006/10/07 11:25:15 elad Exp $ |
2# $FreeBSD: head/etc/rc.subr 197947 2009-10-10 22:17:03Z dougb $ |
3# 4# Copyright (c) 1997-2004 The NetBSD Foundation, Inc. 5# All rights reserved. 6# 7# This code is derived from software contributed to The NetBSD Foundation 8# by Luke Mewburn. 9# 10# Redistribution and use in source and binary forms, with or without --- 382 unchanged lines hidden (view full) --- 393 sleep 2 394 done 395 if [ -n "$_prefix" ]; then 396 echo "." 397 fi 398} 399 400# |
401# check_startmsgs 402# If rc_quiet is set (usually as a result of using faststart at 403# boot time) check if rc_startmsgs is enabled. 404# 405check_startmsgs() 406{ 407 if [ -n "$rc_quiet" ]; then 408 checkyesno rc_startmsgs 409 else 410 return 0 411 fi 412} 413 414# |
415# run_rc_command argument 416# Search for argument in the list of supported commands, which is: 417# "start stop restart rcvar status poll ${extra_commands}" 418# If there's a match, run ${argument}_cmd or the default method 419# (see below). 420# 421# If argument has a given prefix, then change the operation as follows: 422# Prefix Operation --- 294 unchanged lines hidden (view full) --- 717 718 if ! _run_rc_precmd; then 719 warn "failed precmd routine for ${name}" 720 return 1 721 fi 722 723 # setup the full command to run 724 # |
725 check_startmsgs && echo "Starting ${name}." |
726 if [ -n "$_chroot" ]; then 727 _doit="\ 728${_nice:+nice -n $_nice }\ 729chroot ${_user:+-u $_user }${_group:+-g $_group }${_groups:+-G $_groups }\ 730$_chroot $command $rc_flags $command_args" 731 else 732 _doit="\ 733${_chdir:+cd $_chdir && }\ --- 993 unchanged lines hidden --- |