Store the full path to the /usr/sbin/postfix in $postfix_command

and use the latter postfix_op() to implement start/stop/reload.
(We generally use full paths in rc.d scripts.)  Problem noted by Bill Squier.
This commit is contained in:
lukem 2004-04-08 06:15:27 +00:00
parent 610ed0d02a
commit 68909c287b
1 changed files with 10 additions and 4 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $NetBSD: postfix,v 1.7 2003/01/31 06:47:16 lukem Exp $
# $NetBSD: postfix,v 1.8 2004/04/08 06:15:27 lukem Exp $
#
# PROVIDE: mail
@ -12,11 +12,12 @@
name="postfix"
rcvar=$name
postfix_command="/usr/sbin/${name}"
required_files="/etc/${name}/main.cf"
start_precmd="postfix_precmd"
start_cmd="${name} "'${rc_arg}'
stop_cmd=$start_cmd
reload_cmd=$start_cmd
start_cmd="postfix_op"
stop_cmd="postfix_op"
reload_cmd="postfix_op"
extra_commands="reload"
spooletcdir="/var/spool/${name}/etc"
required_dirs=$spooletcdir
@ -37,5 +38,10 @@ postfix_precmd()
done
}
postfix_op()
{
${postfix_command} ${rc_arg}
}
load_rc_config $name
run_rc_command "$1"