rc.subr (178776) | rc.subr (179870) |
---|---|
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 178776 2008-05-05 15:52:54Z maxim $ | 2# $FreeBSD: head/etc/rc.subr 179870 2008-06-19 06:11:34Z mtm $ |
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 --- 596 unchanged lines hidden (view full) --- 607 _group=\$${name}_group _groups=\$${name}_groups 608 609 if [ -n "$_user" ]; then # unset $_user if running as that user 610 if [ "$_user" = "$(eval $IDCMD)" ]; then 611 unset _user 612 fi 613 fi 614 | 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 --- 596 unchanged lines hidden (view full) --- 607 _group=\$${name}_group _groups=\$${name}_groups 608 609 if [ -n "$_user" ]; then # unset $_user if running as that user 610 if [ "$_user" = "$(eval $IDCMD)" ]; then 611 unset _user 612 fi 613 fi 614 |
615 eval $_pidcmd # determine the pid if necessary 616 617 for _elem in $_keywords; do 618 if [ "$_elem" != "$rc_arg" ]; then 619 continue 620 fi |
|
615 # if ${rcvar} is set, and $1 is not 616 # "rcvar", then run 617 # checkyesno ${rcvar} 618 # and return if that failed 619 # | 621 # if ${rcvar} is set, and $1 is not 622 # "rcvar", then run 623 # checkyesno ${rcvar} 624 # and return if that failed 625 # |
620 if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" ]; then 621 if ! checkyesno ${rcvar}; then 622 if [ -n "${rc_quiet}" ]; then | 626 if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" ]; then 627 if ! checkyesno ${rcvar}; then 628 if [ -n "${rc_quiet}" ]; then 629 return 0 630 fi 631 echo -n "Cannot '${rc_arg}' $name. Set ${rcvar} to " 632 echo -n "YES in /etc/rc.conf or use 'one${rc_arg}' " 633 echo "instead of '${rc_arg}'." |
623 return 0 624 fi | 634 return 0 635 fi |
625 echo -n "Cannot '${rc_arg}' $name. Set ${rcvar} to " 626 echo -n "YES in /etc/rc.conf or use 'one${rc_arg}' " 627 echo "instead of '${rc_arg}'." 628 return 0 | |
629 fi | 636 fi |
630 fi | |
631 | 637 |
632 eval $_pidcmd # determine the pid if necessary 633 634 for _elem in $_keywords; do 635 if [ "$_elem" != "$rc_arg" ]; then 636 continue 637 fi | |
638 # if there's a custom ${XXX_cmd}, 639 # run that instead of the default 640 # 641 eval _cmd=\$${rc_arg}_cmd \ 642 _precmd=\$${rc_arg}_precmd \ 643 _postcmd=\$${rc_arg}_postcmd 644 645 if [ -n "$_cmd" ]; then --- 942 unchanged lines hidden --- | 638 # if there's a custom ${XXX_cmd}, 639 # run that instead of the default 640 # 641 eval _cmd=\$${rc_arg}_cmd \ 642 _precmd=\$${rc_arg}_precmd \ 643 _postcmd=\$${rc_arg}_postcmd 644 645 if [ -n "$_cmd" ]; then --- 942 unchanged lines hidden --- |