diff options
Diffstat (limited to 'net-mgmt/nagios-plugins/scripts')
-rw-r--r-- | net-mgmt/nagios-plugins/scripts/configure | 107 | ||||
-rw-r--r-- | net-mgmt/nagios-plugins/scripts/createuser | 49 |
2 files changed, 0 insertions, 156 deletions
diff --git a/net-mgmt/nagios-plugins/scripts/configure b/net-mgmt/nagios-plugins/scripts/configure deleted file mode 100644 index efb83034f1d2..000000000000 --- a/net-mgmt/nagios-plugins/scripts/configure +++ /dev/null @@ -1,107 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then - exit -fi - -tempfile=`mktemp -t checklist` - -if [ "${BATCH}" = "yes" ]; then -else - /usr/bin/dialog --title "NetSaint plugins configuration options" --clear \ - --checklist "\n\ -Please select desired options:" -1 -1 16 \ -QStat "Game server query support" OFF \ -FPing "Support for non-flooding fast ping" OFF \ -NetSNMP "SNMP support" OFF \ -Radiusclient "Radius support" OFF \ -MySQL "MySQL support" OFF \ -PostgreSQL "PostgreSQL support" OFF \ -OpenLDAP "OpenLDAP 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 - -exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc - -SUB_QSTAT="@comment " -SUB_FPING="@comment " -SUB_SNMP="@comment " -SUB_RADIUS="@comment " -SUB_MYSQL="@comment " -SUB_PGSQL="@comment " -SUB_LDAP="@comment " - -while [ "$1" ]; do - case $1 in - \"QStat\") - echo "BUILD_DEPENDS+= qstat:\${PORTSDIR}/games/qstat" - echo "RUN_DEPENDS+= qstat:\${PORTSDIR}/games/qstat" - echo "CONFIGURE_ARGS+= --enable-qstat" - SUB_QSTAT="" - ;; - \"FPing\") - echo "BUILD_DEPENDS+= fping:\${PORTSDIR}/net/fping" - echo "RUN_DEPENDS+= fping:\${PORTSDIR}/net/fping" - echo "CONFIGURE_ARGS+= --enable-fping" - SUB_FPING="" - ;; - \"NetSNMP\") - echo "BUILD_DEPENDS+= snmpcheck:\${PORTSDIR}/net/net-snmp" - echo "RUN_DEPENDS+= snmpcheck:\${PORTSDIR}/net/net-snmp" - echo "CONFIGURE_ARGS+= --enable-snmp" - SUB_SNMP="" - ;; - \"Radiusclient\") - echo "LIB_DEPENDS+= radiusclient.0:\${PORTSDIR}/net/radiusclient" - echo "CONFIGURE_ARGS+= --enable-radius" - SUB_RADIUS="" - ;; - \"MySQL\") - echo "LIB_DEPENDS+= mysqlclient.10:\${PORTSDIR}/databases/mysql323-client" - echo "CONFIGURE_ARGS+= --with-mysqllibdir=\${LOCALBASE}/lib/mysql" - SUB_MYSQL="" - ;; - \"PostgreSQL\") - echo "LIB_DEPENDS+= pq.2:\${PORTSDIR}/databases/postgresql7" - echo "CONFIGURE_ARGS+= --with-pgsql=\${LOCALBASE}/pgsql" - SUB_PGSQL="" - ;; - \"OpenLDAP\") - echo "LIB_DEPENDS+= ldap.2:\${PORTSDIR}/net/openldap2" - echo "CONFIGURE_ARGS+= --enable-ldap" - SUB_LDAP="" - ;; - *) - echo "Invalid option(s): $*" > /dev/stderr - rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc - exit 1 - ;; - esac - shift -done - -echo "PLIST_SUB+= SUB_QSTAT=\"${SUB_QSTAT}\"" -echo "PLIST_SUB+= SUB_FPING=\"${SUB_FPING}\"" -echo "PLIST_SUB+= SUB_SNMP=\"${SUB_SNMP}\"" -echo "PLIST_SUB+= SUB_RADIUS=\"${SUB_RADIUS}\"" -echo "PLIST_SUB+= SUB_MYSQL=\"${SUB_MYSQL}\"" -echo "PLIST_SUB+= SUB_PGSQL=\"${SUB_PGSQL}\"" -echo "PLIST_SUB+= SUB_LDAP=\"${SUB_LDAP}\"" diff --git a/net-mgmt/nagios-plugins/scripts/createuser b/net-mgmt/nagios-plugins/scripts/createuser deleted file mode 100644 index 0ebde3c5496d..000000000000 --- a/net-mgmt/nagios-plugins/scripts/createuser +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/perl -# - -eval '(exit $?0)' && eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' -& eval 'exec /usr/bin/perl -S $0 $argv:q' -if 0; - -if( $> ) { - print "\nYou must be root to run this step!\n\n"; - exit 1; -} - -if( getpwnam( "netsaint" ) ) { - ( $null, $null, $nsUID ) = getpwnam( "netsaint" ); -} else { - $nsUID = 70; - while( getpwuid( $nsUID ) ) { - $nsUID++; - } -} - -if( getgrnam( "netsaint" ) ) { - ( $null, $null, $nsGID ) = getgrnam( "netsaint" ); -} else { - $nsGID = 70; - while( getgrgid( $nsGID ) ) { - $nsGID++; - } - &append_file( "/etc/group", "netsaint:*:$nsGID:" ); -} - -print "netsaint user using uid $nsUID and gid $nsGID\n"; - -system( "/usr/bin/chpass -a \"netsaint:*:$nsUID:$nsGID\:\:0:0:Netsaint pseudo-user:/var/netsaint:/sbin/nologin\"" ); - -sub append_file { - local($file,@list) = @_; - local($LOCK_EX) = 2; - local($LOCK_NB) = 4; - local($LOCK_UN) = 8; - - open(F, ">> $file") || die "$file: $!\n"; - while( ! flock( F, $LOCK_EX | $LOCK_NB ) ) { - exit 1; - } - print F join( "\n", @list) . "\n"; - close F; - flock( F, $LOCK_UN ); -} |