rc.subr (149421) | rc.subr (150796) |
---|---|
1# $NetBSD: rc.subr,v 1.60 2003/07/26 05:13:47 lukem Exp $ | 1# $NetBSD: rc.subr,v 1.60 2003/07/26 05:13:47 lukem Exp $ |
2# $FreeBSD: head/etc/rc.subr 149421 2005-08-24 16:25:47Z yar $ | 2# $FreeBSD: head/etc/rc.subr 150796 2005-10-01 20:58:03Z yar $ |
3# 4# Copyright (c) 1997-2002 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 --- 499 unchanged lines hidden (view full) --- 510 _pidcmd='rc_pid=$(check_process '"$_procname $command_interpreter"')' 511 fi 512 if [ -n "$_pidcmd" ]; then 513 _keywords="${_keywords} status poll" 514 fi 515 fi 516 517 if [ -z "$rc_arg" ]; then | 3# 4# Copyright (c) 1997-2002 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 --- 499 unchanged lines hidden (view full) --- 510 _pidcmd='rc_pid=$(check_process '"$_procname $command_interpreter"')' 511 fi 512 if [ -n "$_pidcmd" ]; then 513 _keywords="${_keywords} status poll" 514 fi 515 fi 516 517 if [ -z "$rc_arg" ]; then |
518 rc_usage "$_keywords" | 518 rc_usage $_keywords |
519 fi 520 521 if [ -n "$flags" ]; then # allow override from environment 522 rc_flags=$flags 523 else 524 eval rc_flags=\$${name}_flags 525 fi 526 eval _chdir=\$${name}_chdir _chroot=\$${name}_chroot \ --- 265 unchanged lines hidden (view full) --- 792 echo "\$${rcvar}=YES" 793 else 794 echo "\$${rcvar}=NO" 795 fi 796 fi 797 ;; 798 799 *) | 519 fi 520 521 if [ -n "$flags" ]; then # allow override from environment 522 rc_flags=$flags 523 else 524 eval rc_flags=\$${name}_flags 525 fi 526 eval _chdir=\$${name}_chdir _chroot=\$${name}_chroot \ --- 265 unchanged lines hidden (view full) --- 792 echo "\$${rcvar}=YES" 793 else 794 echo "\$${rcvar}=NO" 795 fi 796 fi 797 ;; 798 799 *) |
800 rc_usage "$_keywords" | 800 rc_usage $_keywords |
801 ;; 802 803 esac 804 return $_return 805 done 806 807 echo 1>&2 "$0: unknown directive '$rc_arg'." | 801 ;; 802 803 esac 804 return $_return 805 done 806 807 echo 1>&2 "$0: unknown directive '$rc_arg'." |
808 rc_usage "$_keywords" | 808 rc_usage $_keywords |
809 exit 1 810} 811 812# 813# run_rc_script file arg 814# Start the script `file' with `arg', and correctly handle the 815# return value from the script. If `file' ends with `.sh', it's 816# sourced into the current environment. If `file' appears to be --- 541 unchanged lines hidden --- | 809 exit 1 810} 811 812# 813# run_rc_script file arg 814# Start the script `file' with `arg', and correctly handle the 815# return value from the script. If `file' ends with `.sh', it's 816# sourced into the current environment. If `file' appears to be --- 541 unchanged lines hidden --- |