rc.subr (200818) | rc.subr (201036) |
---|---|
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 200818 2009-12-21 22:16:07Z jilles $ | 2# $FreeBSD: head/etc/rc.subr 201036 2009-12-27 06:25: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 --- 722 unchanged lines hidden (view full) --- 733${_chdir:+cd $_chdir && }\ 734$command $rc_flags $command_args" 735 if [ -n "$_user" ]; then 736 _doit="su -m $_user -c 'sh -c \"$_doit\"'" 737 fi 738 if [ -n "$_nice" ]; then 739 if [ -z "$_user" ]; then 740 _doit="sh -c \"$_doit\"" | 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 --- 722 unchanged lines hidden (view full) --- 733${_chdir:+cd $_chdir && }\ 734$command $rc_flags $command_args" 735 if [ -n "$_user" ]; then 736 _doit="su -m $_user -c 'sh -c \"$_doit\"'" 737 fi 738 if [ -n "$_nice" ]; then 739 if [ -z "$_user" ]; then 740 _doit="sh -c \"$_doit\"" |
741 fi | 741 fi |
742 _doit="nice -n $_nice $_doit" 743 fi 744 fi 745 746 # run the full command 747 # 748 if ! _run_rc_doit "$_doit"; then 749 warn "failed to start ${name}" --- 308 unchanged lines hidden (view full) --- 1058 _msg="Use \$$_new instead." 1059 fi 1060 fi 1061 warn "\$$_var is obsolete. $_msg" 1062 ;; 1063 esac 1064 done 1065} | 742 _doit="nice -n $_nice $_doit" 743 fi 744 fi 745 746 # run the full command 747 # 748 if ! _run_rc_doit "$_doit"; then 749 warn "failed to start ${name}" --- 308 unchanged lines hidden (view full) --- 1058 _msg="Use \$$_new instead." 1059 fi 1060 fi 1061 warn "\$$_var is obsolete. $_msg" 1062 ;; 1063 esac 1064 done 1065} |
1066 | 1066 |
1067# 1068# load_rc_config_var name var 1069# Read the rc.conf(5) var for name and set in the 1070# current shell, using load_rc_config in a subshell to prevent 1071# unwanted side effects from other variable assignments. 1072# 1073load_rc_config_var() 1074{ --- 652 unchanged lines hidden --- | 1067# 1068# load_rc_config_var name var 1069# Read the rc.conf(5) var for name and set in the 1070# current shell, using load_rc_config in a subshell to prevent 1071# unwanted side effects from other variable assignments. 1072# 1073load_rc_config_var() 1074{ --- 652 unchanged lines hidden --- |