Lines 808-813
startmsg()
Link Here
|
808 |
# |
808 |
# |
809 |
# ${name}_limits n limits(1) to apply to ${command}. |
809 |
# ${name}_limits n limits(1) to apply to ${command}. |
810 |
# |
810 |
# |
|
|
811 |
# ${name}_offcmd n If set, run if a service is not enabled. |
812 |
# |
811 |
# ${rc_arg}_cmd n If set, use this as the method when invoked; |
813 |
# ${rc_arg}_cmd n If set, use this as the method when invoked; |
812 |
# Otherwise, use default command (see below) |
814 |
# Otherwise, use default command (see below) |
813 |
# |
815 |
# |
Lines 1019-1031
run_rc_command()
Link Here
|
1019 |
-a "$rc_arg" != "describe" ] || |
1021 |
-a "$rc_arg" != "describe" ] || |
1020 |
[ -n "${rcvar}" -a "$rc_arg" = "stop" -a -z "${rc_pid}" ]; then |
1022 |
[ -n "${rcvar}" -a "$rc_arg" = "stop" -a -z "${rc_pid}" ]; then |
1021 |
if ! checkyesno ${rcvar}; then |
1023 |
if ! checkyesno ${rcvar}; then |
1022 |
if [ -n "${rc_quiet}" ]; then |
1024 |
[ "$rc_arg" = "start" ] && _run_rc_offcmd |
1023 |
return 0 |
1025 |
if [ -z "${rc_quiet}" ]; then |
1024 |
fi |
|
|
1025 |
echo -n "Cannot '${rc_arg}' $name. Set ${rcvar} to " |
1026 |
echo -n "Cannot '${rc_arg}' $name. Set ${rcvar} to " |
1026 |
echo -n "YES in /etc/rc.conf or use 'one${rc_arg}' " |
1027 |
echo -n "YES in /etc/rc.conf or use 'one${rc_arg}' " |
1027 |
echo "instead of '${rc_arg}'." |
1028 |
echo "instead of '${rc_arg}'." |
1028 |
return 0 |
1029 |
fi |
|
|
1030 |
return 0 |
1029 |
fi |
1031 |
fi |
1030 |
fi |
1032 |
fi |
1031 |
|
1033 |
|
Lines 1308-1317
$command $rc_flags $command_args"
Link Here
|
1308 |
# |
1310 |
# |
1309 |
# name R/W |
1311 |
# name R/W |
1310 |
# ------------------ |
1312 |
# ------------------ |
|
|
1313 |
# _offcmd R |
1311 |
# _precmd R |
1314 |
# _precmd R |
1312 |
# _postcmd R |
1315 |
# _postcmd R |
1313 |
# _return W |
1316 |
# _return W |
1314 |
# |
1317 |
# |
|
|
1318 |
_run_rc_offcmd() |
1319 |
{ |
1320 |
eval _offcmd=\$${name}_offcmd |
1321 |
if [ -n "$_offcmd" ]; then |
1322 |
if [ -n "$_env" ]; then |
1323 |
eval "export -- $_env" |
1324 |
fi |
1325 |
debug "run_rc_command: ${rc_arg}_offcmd: $_offcmd $rc_extra_args" |
1326 |
eval "$_offcmd $rc_extra_args" |
1327 |
_return=$? |
1328 |
fi |
1329 |
return 0 |
1330 |
} |
1331 |
|
1315 |
_run_rc_precmd() |
1332 |
_run_rc_precmd() |
1316 |
{ |
1333 |
{ |
1317 |
check_required_before "$rc_arg" || return 1 |
1334 |
check_required_before "$rc_arg" || return 1 |