rc.subr (201036) | rc.subr (201038) |
---|---|
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 201036 2009-12-27 06:25:03Z dougb $ | 2# $FreeBSD: head/etc/rc.subr 201038 2009-12-27 06:27:09Z 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 --- 942 unchanged lines hidden (view full) --- 953 _cmd="su -m ${_user} -c 'sh -c \"${_cmd}\"'" 954 fi 955 echo "$_cmd" 956} 957 958# 959# run_rc_script file arg 960# Start the script `file' with `arg', and correctly handle the | 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 --- 942 unchanged lines hidden (view full) --- 953 _cmd="su -m ${_user} -c 'sh -c \"${_cmd}\"'" 954 fi 955 echo "$_cmd" 956} 957 958# 959# run_rc_script file arg 960# Start the script `file' with `arg', and correctly handle the |
961# return value from the script. If `file' ends with `.sh', it's 962# sourced into the current environment. If `file' appears to be 963# a backup or scratch file, ignore it. Otherwise if it's 964# executable run as a child process. | 961# return value from the script. 962# If `file' ends with `.sh', it's sourced into the current environment 963# when $rc_fast_and_loose is set, otherwise it is run as a child process. 964# If `file' appears to be a backup or scratch file, ignore it. 965# Otherwise if it is executable run as a child process. |
965# 966run_rc_script() 967{ 968 _file=$1 969 _arg=$2 970 if [ -z "$_file" -o -z "$_arg" ]; then 971 err 3 'USAGE: run_rc_script file arg' 972 fi --- 754 unchanged lines hidden --- | 966# 967run_rc_script() 968{ 969 _file=$1 970 _arg=$2 971 if [ -z "$_file" -o -z "$_arg" ]; then 972 err 3 'USAGE: run_rc_script file arg' 973 fi --- 754 unchanged lines hidden --- |