diff options
author | dwcjr <dwcjr@FreeBSD.org> | 2002-05-30 03:09:05 +0800 |
---|---|---|
committer | dwcjr <dwcjr@FreeBSD.org> | 2002-05-30 03:09:05 +0800 |
commit | 784e42e36773ee5a6017ebf1102996ef786e0ba0 (patch) | |
tree | 82723e5c20b275e92b2b175883acad9d36d2cc34 /net/samba-tng/scripts | |
parent | 8cae3e3051a463b8f36d4c8ea7726a9dd07392fa (diff) | |
download | freebsd-ports-gnome-784e42e36773ee5a6017ebf1102996ef786e0ba0.tar.gz freebsd-ports-gnome-784e42e36773ee5a6017ebf1102996ef786e0ba0.tar.zst freebsd-ports-gnome-784e42e36773ee5a6017ebf1102996ef786e0ba0.zip |
Add menu system
Inspired by: submitters of samba menu system
Diffstat (limited to 'net/samba-tng/scripts')
-rw-r--r-- | net/samba-tng/scripts/configure.samba | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/net/samba-tng/scripts/configure.samba b/net/samba-tng/scripts/configure.samba new file mode 100644 index 000000000000..78b9b996dcc9 --- /dev/null +++ b/net/samba-tng/scripts/configure.samba @@ -0,0 +1,68 @@ +#!/bin/sh + +if [ -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc ]; then + exit +fi + +tempfile=`/usr/bin/mktemp -t checklist` + +if [ "${BATCH}" ]; then + if [ "${SAMBA_OPTIONS}" ]; then + set ${SAMBA_OPTIONS} + fi +else + /usr/bin/dialog --title "configuration options" --clear \ + --checklist "\n\ +Please select desired options:" -1 -1 9 \ +syslog "With syslog support" OFF \ +ldap "With LDAP2 support" ON \ +nocups "Without CUPS" OFF \ +msdfs "With MSDFS support" OFF \ +quota "With Quota support" OFF \ +2> $tempfile + + retval=$? + + if [ -s $tempfile ]; then + set `cat $tempfile` + fi + rm -f $tempfile + + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + exit 1 + ;; + esac +fi + +echo "SCRIPT_RUN=yes" >${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc + +while [ "$1" ]; do + case $1 in + \"syslog\") + echo "WITH_SYSLOG=YES" >>${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc + ;; + \"ldap\") + echo "WITH_LDAP=YES" >>${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc + ;; + \"nocups\") + echo "WITHOUT_CUPS=YES" >>${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc + ;; + \"msdfs\") + echo "WITH_MSDFS=YES" >>${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc + ;; + \"quota\") + echo "WITH_QUOTA=YES" >>${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc + ;; + *) + echo "Invalid option: $1" + rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc + exit 1 + ;; + esac + shift +done |