rc.subr (197790) | rc.subr (197947) |
---|---|
1# $NetBSD: rc.subr,v 1.67 2006/10/07 11:25:15 elad Exp $ | 1# $NetBSD: rc.subr,v 1.67 2006/10/07 11:25:15 elad Exp $ |
2# $FreeBSD: head/etc/rc.subr 197790 2009-10-05 20:11:33Z hrs $ | 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# | 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# |
|
401# run_rc_command argument 402# Search for argument in the list of supported commands, which is: 403# "start stop restart rcvar status poll ${extra_commands}" 404# If there's a match, run ${argument}_cmd or the default method 405# (see below). 406# 407# If argument has a given prefix, then change the operation as follows: 408# Prefix Operation --- 294 unchanged lines hidden (view full) --- 703 704 if ! _run_rc_precmd; then 705 warn "failed precmd routine for ${name}" 706 return 1 707 fi 708 709 # setup the full command to run 710 # | 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 # |
711 _show_startmsgs=1 712 if [ -n "${rc_quiet}" ]; then 713 if ! checkyesno rc_startmsgs; then 714 unset _show_startmsgs 715 fi 716 fi 717 [ -n "$_show_startmsgs" ] && echo "Starting ${name}." | 725 check_startmsgs && echo "Starting ${name}." |
718 if [ -n "$_chroot" ]; then 719 _doit="\ 720${_nice:+nice -n $_nice }\ 721chroot ${_user:+-u $_user }${_group:+-g $_group }${_groups:+-G $_groups }\ 722$_chroot $command $rc_flags $command_args" 723 else 724 _doit="\ 725${_chdir:+cd $_chdir && }\ --- 993 unchanged lines hidden --- | 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 --- |