From f36e96f0ba53cafd8a45f7b05f1dc93ffc7d1af9 Mon Sep 17 00:00:00 2001 From: marcus Date: Sat, 9 Feb 2008 00:21:28 +0000 Subject: Remove vty-checker. It was a nice experiment, but ultimately a failure. git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@10370 df743ca5-7f9a-e211-a948-0013205c9059 --- sysutils/vty-checker/Makefile | 34 ------------- sysutils/vty-checker/pkg-descr | 4 -- sysutils/vty-checker/src/Makefile | 6 --- sysutils/vty-checker/src/vty-checker.c | 90 ---------------------------------- 4 files changed, 134 deletions(-) delete mode 100644 sysutils/vty-checker/Makefile delete mode 100644 sysutils/vty-checker/pkg-descr delete mode 100644 sysutils/vty-checker/src/Makefile delete mode 100644 sysutils/vty-checker/src/vty-checker.c diff --git a/sysutils/vty-checker/Makefile b/sysutils/vty-checker/Makefile deleted file mode 100644 index e554cdfc8..000000000 --- a/sysutils/vty-checker/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -# New ports collection makefile for: vty-checker -# Date created: 02 February 2008 -# Whom: Joe Marcus Clarke -# -# $FreeBSD$ -# $MCom: ports/sysutils/vty-checker/Makefile,v 1.1 2008/02/02 23:58:48 marcus Exp $ -# -# This port is self contained in the src directory. -# - -PORTNAME= vty-checker -PORTVERSION= 1.0.1 -CATEGORIES= sysutils -MASTER_SITES= # none -DISTFILES= # none - -MAINTAINER= gnome@FreeBSD.org -COMMENT= A small tool to verify all VTY lines have been configured - -WRKSRC= ${WRKDIR}/src -SRC= ${.CURDIR}/src - -PLIST_FILES= bin/vty-checker - -do-fetch: - @${DO_NADA} - -pre-patch: - @${CP} -R ${SRC} ${WRKDIR} - -do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/vty-checker ${PREFIX}/bin/vty-checker - -.include diff --git a/sysutils/vty-checker/pkg-descr b/sysutils/vty-checker/pkg-descr deleted file mode 100644 index 1a1ce2f3a..000000000 --- a/sysutils/vty-checker/pkg-descr +++ /dev/null @@ -1,4 +0,0 @@ -vty-checker is a small tool which tries to open each configured VTY line to -make sure the device is configured. The idea is to run this program prior to -starting an application which will bind to a particular VTY. This is -especially important for programs starting out of rc.d. diff --git a/sysutils/vty-checker/src/Makefile b/sysutils/vty-checker/src/Makefile deleted file mode 100644 index 7fc3de652..000000000 --- a/sysutils/vty-checker/src/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -PROG= vty-checker -SRCS= vty-checker.c - -MAN= - -.include diff --git a/sysutils/vty-checker/src/vty-checker.c b/sysutils/vty-checker/src/vty-checker.c deleted file mode 100644 index 0a0b0090b..000000000 --- a/sysutils/vty-checker/src/vty-checker.c +++ /dev/null @@ -1,90 +0,0 @@ -/*- - * Copyright (c) 2008 Joe Marcus Clarke - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -#include -#include -#include -#include -#include -#include -#include -#include - -int -main(int argc, char **argv) -{ - int debug; - char *debugstr; - struct ttyent *t; - char ttydev[PATH_MAX]; - int res, ret; - - ret = 0; - - debugstr = getenv("VTY_CHECKER_DEBUG"); - if (debugstr != NULL) { - debug = atoi(debugstr); - } else { - debug = 0; - } - - res = setttyent(); - if (res == 0) { - /* We cannot get a list of VTYs. Return TRUE, and let the - * caller sort things out. - */ - if (debug) { - (void)fprintf(stderr, "Failed to get TTY entries: %s\n", - strerror(errno)); - } - return (0); - } - - (void)sprintf(ttydev, "/dev/"); - - while ((t = getttyent()) != NULL) { - if (t->ty_status & TTY_ON && strncmp(t->ty_name, "ttyv", 4) == 0) { - char *ty_devptr; - int fd; - - ty_devptr = ttydev + 6; - (void)strlcat(ty_devptr, t->ty_name, PATH_MAX); - - if ((fd = open(ttydev, O_RDONLY | O_NOCTTY)) < 0) { - if (debug) { - (void)fprintf(stderr, - "Failed to open %s: %s\n", - ttydev, strerror(errno)); - } - ret = 1; - break; - } - (void)close(fd); - } - } - - endttyent(); - - return (ret); -} -- cgit v1.2.3