diff options
author | schmonz <schmonz> | 2005-07-20 03:28:41 +0000 |
---|---|---|
committer | schmonz <schmonz> | 2005-07-20 03:28:41 +0000 |
commit | 1792e55019ce29b93d4b9d0a4ffcc1933cc49ef3 (patch) | |
tree | ebb355a4a9334cffb916244eeedd9b5ea9ce8313 /security/cvm/files | |
parent | 440a3f3b6ebb3c7313779d1a9448b977f66c7c76 (diff) | |
download | pkgsrc-1792e55019ce29b93d4b9d0a4ffcc1933cc49ef3.tar.gz |
Initial import of Credential Validation Modules. This package contains:
- The reference source for the CVM interface.
- Diagnostic and benchmark CVM clients.
- A checkpassword interface CVM client.
- A UNIX/POSIX system module (uses getpwnam).
- A flat-file module.
- A vmailmgr module.
- MySQL and PgSQL modules.
- A library for client writers.
- A set of libraries for module writers.
Diffstat (limited to 'security/cvm/files')
-rw-r--r-- | security/cvm/files/cvm.sh | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/security/cvm/files/cvm.sh b/security/cvm/files/cvm.sh new file mode 100644 index 00000000000..6c35ed30b92 --- /dev/null +++ b/security/cvm/files/cvm.sh @@ -0,0 +1,46 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: cvm.sh,v 1.1.1.1 2005/07/20 03:28:42 schmonz Exp $ +# + +# PROVIDE: cvm +# REQUIRE: LOGIN + +name="cvm" + +# User-settable rc.conf variables and their default values: +: ${cvm_postenv:="CVM_LOOKUP_SECRET=''"} +: ${cvm_datalimit:="9000000"} +: ${cvm_module:="qmail"} +: ${cvm_protocol:="local"} +: ${cvm_log:="YES"} +: ${cvm_logcmd:="logger -t nb${name} -p auth.info"} +: ${cvm_nologcmd:="@LOCALBASE@/bin/multilog -*"} + +if [ -f /etc/rc.subr ]; then + . /etc/rc.subr +fi + +rcvar=${name} +command="@LOCALBASE@/bin/cvm-${cvm_module}" +start_precmd="cvm_precmd" + +cvm_precmd() +{ + if [ -f /etc/rc.subr ]; then + checkyesno cvm_log || cvm_logcmd=${cvm_nologcmd} + fi + umask 0 + command="@SETENV@ - ${cvm_postenv} @LOCALBASE@/bin/softlimit -m ${cvm_datalimit} @LOCALBASE@/bin/cvm-${cvm_module} cvm-${cvm_protocol}:@VARBASE@/run/cvm-${cvm_module} 2>&1 | @LOCALBASE@/bin/setuidgid cvmlog ${cvm_logcmd}" + command_args="&" + rc_flags="" +} + +if [ -f /etc/rc.subr ]; then + load_rc_config $name + run_rc_command "$1" +else + @ECHO_N@ " ${name}" + cvm_precmd + eval ${command} ${cvm_flags} ${command_args} +fi |