Deleted Added
full compact
rc.subr (160698) rc.subr (161396)
1# $NetBSD: rc.subr,v 1.66 2006/04/01 10:05:50 he Exp $
1# $NetBSD: rc.subr,v 1.66 2006/04/01 10:05:50 he Exp $
2# $FreeBSD: head/etc/rc.subr 160698 2006-07-26 08:03:24Z yar $
2# $FreeBSD: head/etc/rc.subr 161396 2006-08-17 08:04:20Z yar $
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

--- 650 unchanged lines hidden (view full) ---

661 echo "Starting ${name}."
662 if [ -n "$_chroot" ]; then
663 _doit="\
664${_nice:+nice -n $_nice }\
665chroot ${_user:+-u $_user }${_group:+-g $_group }${_groups:+-G $_groups }\
666$_chroot $command $rc_flags $command_args"
667 else
668 _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

--- 650 unchanged lines hidden (view full) ---

661 echo "Starting ${name}."
662 if [ -n "$_chroot" ]; then
663 _doit="\
664${_nice:+nice -n $_nice }\
665chroot ${_user:+-u $_user }${_group:+-g $_group }${_groups:+-G $_groups }\
666$_chroot $command $rc_flags $command_args"
667 else
668 _doit="\
669${_chdir:+cd $_chdir; }\
670${_nice:+nice -n $_nice }\
669${_chdir:+cd $_chdir && }\
671$command $rc_flags $command_args"
672 if [ -n "$_user" ]; then
673 _doit="su -m $_user -c 'sh -c \"$_doit\"'"
674 fi
670$command $rc_flags $command_args"
671 if [ -n "$_user" ]; then
672 _doit="su -m $_user -c 'sh -c \"$_doit\"'"
673 fi
674 if [ -n "$_nice" ]; then
675 if [ -z "$_user" ]; then
676 _doit="sh -c \"$_doit\""
677 fi
678 _doit="nice -n $_nice $_doit"
679 fi
675 fi
676
677 # run the full command;
678 # if the cmd failed and force
679 # isn't set, exit
680 #
681 debug "run_rc_command: _doit: $_doit"
682 eval $_doit

--- 831 unchanged lines hidden ---
680 fi
681
682 # run the full command;
683 # if the cmd failed and force
684 # isn't set, exit
685 #
686 debug "run_rc_command: _doit: $_doit"
687 eval $_doit

--- 831 unchanged lines hidden ---