diff options
author | Lennart Poettering <lennart@poettering.net> | 2003-08-11 16:19:52 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2003-08-11 16:19:52 +0000 |
commit | c471ab6794ad48a571f8658fa1fab6d4ab8cc358 (patch) | |
tree | e4cf58dc4b2689460d0c83e7b9d96d5c8a2cf7d1 | |
parent | 9a5162c33017bab6677c528189cff5a501f3822a (diff) |
distcheck works now
build fixes
git-svn-id: file:///home/lennart/svn/public/ifplugd/trunk@31 2bf48fe7-cfc1-0310-909f-d9042e1e0fef
-rwxr-xr-x | bootstrap.sh | 1 | ||||
-rw-r--r-- | conf/Makefile.am | 9 | ||||
-rw-r--r-- | conf/ifplugd.conf | 22 | ||||
-rwxr-xr-x | conf/ifplugd.init.in | 14 | ||||
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | doc/Makefile.am | 2 | ||||
-rw-r--r-- | doc/SUPPORTED_DRIVERS | 5 | ||||
-rw-r--r-- | src/Makefile.am | 34 | ||||
-rw-r--r-- | src/ifmonitor.c | 6 | ||||
-rw-r--r-- | src/ifplugd.c | 6 | ||||
-rw-r--r-- | src/interface.c | 4 | ||||
-rw-r--r-- | src/nlapi.c | 7 | ||||
-rw-r--r-- | src/wireless.h | 27 |
13 files changed, 103 insertions, 42 deletions
diff --git a/bootstrap.sh b/bootstrap.sh index 6813f92..ea58438 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -36,4 +36,3 @@ else ./configure --sysconfdir=/etc "$@" fi - diff --git a/conf/Makefile.am b/conf/Makefile.am index e873a24..743aa41 100644 --- a/conf/Makefile.am +++ b/conf/Makefile.am @@ -27,6 +27,9 @@ ifplugd.init: ifplugd.init.in Makefile chmod 755 $@ install-data-local: ifplugd.init - $(INSTALL) -D -m755 ifplugd.init ${DESTDIR}/${sysconfdir}/init.d/ifplugd - $(INSTALL) -D -m755 ifplugd.action ${DESTDIR}/${sysconfdir}/ifplugd/ifplugd.action - $(INSTALL) -D -m644 ifplugd.conf ${DESTDIR}/${sysconfdir}/ifplugd/ifplugd.conf + $(INSTALL) -b -D -m755 ifplugd.init ${DESTDIR}/${sysconfdir}/init.d/ifplugd + $(INSTALL) -b -D -m755 $(srcdir)/ifplugd.action ${DESTDIR}/${sysconfdir}/ifplugd/ifplugd.action + $(INSTALL) -b -D -m644 $(srcdir)/ifplugd.conf ${DESTDIR}/${sysconfdir}/ifplugd/ifplugd.conf + +uninstall-local: + rm -f ${DESTDIR}/${sysconfdir}/ifplugd/ifplugd.action ${DESTDIR}/${sysconfdir}/ifplugd/ifplugd.conf ${DESTDIR}/${sysconfdir}/init.d/ifplugd diff --git a/conf/ifplugd.conf b/conf/ifplugd.conf index 7e53334..1787dd1 100644 --- a/conf/ifplugd.conf +++ b/conf/ifplugd.conf @@ -19,18 +19,24 @@ # ifplugd configuration file +# Please note that this is a bourne shell fragment sourced by the +# init script of ifplugd. + # Specify the interfaces to control here, separated by spaces. -# Ifplugd processes will be started for each of these interfaces -# when the ifplugd init script is called with the "start" argument. -# You may use the magic string "auto" to make the init script -# start or stop ifplugd processes for ALL eth and wlan interfaces -# that are available according to /proc/net/dev. Note that the -# list of interfaces appearing in /proc/net/dev may depend on -# which kernel modules you have loaded. +# Ifplugd processes will be started for each of these interfaces when +# the ifplugd init script is called with the "start" argument. You may +# use the magic string "auto" to make the init script start or stop +# ifplugd processes for ALL eth and wlan interfaces that are available +# according to /proc/net/dev. Note that the list of interfaces +# appearing in /proc/net/dev may depend on which kernel modules you +# have loaded. INTERFACES="eth0" # Additional parameters for ifplugd. # (Run "ifplugd -h" for further information.) ARGS="-fwI -u0 -d10" -ARGS_wlan0="-MwI -u5 -d5" +# Additional parameters for ifplugd for the specified interface. Note +# that $ARGS is ignored, when a variable like this is set for an +# interface +#ARGS_wlan0="-MwI -u5 -d5" diff --git a/conf/ifplugd.init.in b/conf/ifplugd.init.in index 89ebdc6..f28274c 100755 --- a/conf/ifplugd.init.in +++ b/conf/ifplugd.init.in @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # $Id: ifplugd.init 1.6 Sat, 01 Feb 2003 03:00:07 +0100 lennart $ # This file is part of ifplugd. @@ -59,15 +59,17 @@ fi case "$1" in start) - echo -n "Starting ethernet plugging daemon:" + echo -n "Starting Network Interface Plugging Daemon:" for IF in $INTERFACES ; do - $IFPLUGD -i $IF $ARGS + A="`eval echo \$\{ARGS_${IF}\}`" + [ -z "$A" ] && A="$ARGS" + $IFPLUGD -i $IF $A echo -n " $IF" done echo "." ;; stop) - echo -n "Stopping ethernet plugging daemon:" + echo -n "Stopping Network Interface Plugging Daemon:" for IF in $INTERFACES ; do $IFPLUGD -k -i $IF echo -n " $IF" @@ -80,7 +82,7 @@ case "$1" in done ;; suspend) - echo -n "Suspending ethernet plugging daemon:" + echo -n "Suspending Network Interface Plugging Daemon:" for IF in $INTERFACES ; do $IFPLUGD -S -i $IF echo -n " $IF" @@ -88,7 +90,7 @@ case "$1" in echo "." ;; resume) - echo -n "Resuming ethernet plugging daemon:" + echo -n "Resuming Network Interface Plugging Daemon:" for IF in $INTERFACES ; do $IFPLUGD -R -i $IF echo -n " $IF" diff --git a/configure.ac b/configure.ac index cf41128..596e9bc 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,6 @@ AC_INIT([ifplugd], [0.16], [mzvscyhtq@itaparica.org]) AC_CONFIG_SRCDIR([src/ifplugd.c]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([foreign -Wall]) -AM_MAINTAINER_MODE # Checks for programs. AC_PROG_CXX @@ -35,6 +34,11 @@ if test "x$GCC" = "xyes" ; then CFLAGS="$CFLAGS -pipe -Wall" fi +if test -d /usr/local/stow ; then + AC_MSG_NOTICE([*** Found /usr/local/stow: installing to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***]) + AC_PREFIX_DEFAULT([/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}]) +fi + AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LN_S @@ -61,7 +65,7 @@ AC_FUNC_SELECT_ARGTYPES AC_FUNC_MALLOC AC_TYPE_SIGNAL AC_FUNC_VPRINTF -AC_CHECK_FUNCS([alarm dup2 memset select setenv socket strchr strdup strerror strrchr]) +AC_CHECK_FUNCS([alarm dup2 memset select setenv socket strchr strdup strerror strrchr strspn]) # LYNX documentation generation AC_ARG_ENABLE(lynx, diff --git a/doc/Makefile.am b/doc/Makefile.am index 94474ba..61f2444 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -17,7 +17,7 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. noinst_DATA = README.html README -EXTRA_DIST = $(noinst_DATA) style.css README.html.in SUPPORTED_HARDWARE NEWS +EXTRA_DIST = $(noinst_DATA) style.css README.html.in SUPPORTED_DRIVERS NEWS MAINTAINERCLEANFILES = README README.html CLEANFILES = diff --git a/doc/SUPPORTED_DRIVERS b/doc/SUPPORTED_DRIVERS index 60c9c4b..b47a1dc 100644 --- a/doc/SUPPORTED_DRIVERS +++ b/doc/SUPPORTED_DRIVERS @@ -8,13 +8,14 @@ suffixed with p are patched with a patch supplied with ifplugd. Driver | Version | Support ---------+----------------------+------------------------------------------------ eepro100 | k2.4.19 | works fine, even with -a -e100 | k2.4.20 | works fine, even with -a +e100 | k2.4.20 | works fine, even with -a 8139too | k2.4.19 | the machine may lock up, doesn't work with -a 8139too | k2.4.20 or d0.9.26 | works, doesn't work with -a 8139too | k2.4.20p or d0.9.26p | works, even with -a de4x5 | k2.4.18 | Fails completely tulip | k2.4.18 | works; does it work with -a??? -3c59x | k2.4.19 and .20 | Works, even with -a +3c59x | k2.4.19 and .20 | Works, even with -a +hostap | d0.0.3 | Works, even with -a Please help me to extend this list and send me (mzvscyhtq [at] itaparica.org) more information about your diff --git a/src/Makefile.am b/src/Makefile.am index e0831c5..87176bc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ -# $Id: Makefile.am 22 2003-06-15 16:36:33Z lennart $ +# $Id$ # This file is part of ifplugd. # @@ -16,22 +16,40 @@ # along with ifplugd; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +MAINTAINERCLEANFILES = svn-revision.h + AM_CFLAGS = -DSYSCONFDIR="\"$(sysconfdir)\"" sbin_PROGRAMS = ifplugd ifstatus -ifplugd_SOURCES = ifplugd.c interface.c interface.h ethtool-kernel.h ethtool-local.h svn-revision.h wireless.15.h ifmonitor.h ifmonitor.c nlapi.h nlapi.c -ifstatus_SOURCES = ifstatus.c interface.c interface.h ethtool-kernel.h ethtool-local.h svn-revision.h wireless.15.h -MAINTAINERCLEANFILES = svn-revision.h +ifplugd_SOURCES = ifplugd.c \ + interface.c interface.h \ + ethtool-kernel.h ethtool-local.h \ + wireless.h wireless.15.h \ + ifmonitor.h ifmonitor.c \ + nlapi.h nlapi.c + +ifstatus_SOURCES = ifstatus.c \ + interface.c interface.h \ + ethtool-kernel.h ethtool-local.h \ + wireless.h wireless.15.h -ifplugd.o: svn-revision.h -ifstatus.o: svn-revision.h +EXTRA_DIST = svn-revision.h + +BUILT_SOURCES = svn-revision.h + +ifstatus.$(OBJEXT): svn-revision.h +ifplugd.$(OBJEXT): svn-revision.h svn-revision.h: Makefile if test -d "$(top_srcdir)/.svn" ; then \ if REV=`svn info "$(top_srcdir)" | grep ^Revision | cut -f2 -d" "` 2> /dev/null ; then \ echo -e "#ifndef foosvnrevisionhfoo\n#define foosvnrevisionhfoo\n#define SVN_REVISION \"$$REV\"\n#endif" > $@ ; \ fi \ - else \ - test -f $@ || touch $@ ; \ fi + +svnkeywords: + rm -f svn-revision.h + svn propset svn:keywords Id *.c *.h Makefile.am + +.PHONY: svnkeywords diff --git a/src/ifmonitor.c b/src/ifmonitor.c index d49160b..83e9bb8 100644 --- a/src/ifmonitor.c +++ b/src/ifmonitor.c @@ -1,4 +1,4 @@ -/* $Id: ifplugd.c 1.12 Sat, 01 Feb 2003 03:00:07 +0100 lennart $ */ +/* $Id$ */ /* * This file is part of ifplugd. @@ -28,6 +28,8 @@ #include <unistd.h> #include <errno.h> +#include <libdaemon/dlog.h> + #include "nlapi.h" static int callback(struct nlmsghdr *n, void *u) { @@ -42,7 +44,7 @@ static int callback(struct nlmsghdr *n, void *u) { i = NLMSG_DATA(n); if (n->nlmsg_len < NLMSG_LENGTH(sizeof(struct ifinfomsg))) { - fprintf(stderr, "NETLINK: Packet too small or truncated! (2)\n"); + daemon_log(LOG_ERR, "NETLINK: Packet too small or truncated! (2)\n"); return -1; } diff --git a/src/ifplugd.c b/src/ifplugd.c index 645efc5..0547808 100644 --- a/src/ifplugd.c +++ b/src/ifplugd.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* $Id: ifplugd.c 1.12 Sat, 01 Feb 2003 03:00:07 +0100 lennart $ */ +/* $Id$ */ /* * This file is part of ifplugd. @@ -761,7 +761,7 @@ void parse_args(int argc, char *argv[]) { case 'w': api_mode = API_WLAN; break; case 'a': api_mode = API_AUTO; break; default: - fprintf(stderr, "Unknown API mode: %s\n", optarg); + daemon_log(LOG_ERR, "Unknown API mode: %s\n", optarg); exit(2); } break; @@ -790,7 +790,7 @@ void parse_args(int argc, char *argv[]) { use_ifmonitor = !use_ifmonitor; break; default: - fprintf(stderr, "Unknown parameter.\n"); + daemon_log(LOG_ERR, "Unknown parameter.\n"); exit(1); } } diff --git a/src/interface.c b/src/interface.c index 8f0a8f1..b6f1ee6 100644 --- a/src/interface.c +++ b/src/interface.c @@ -1,4 +1,4 @@ -/* $Id: interface.c 1.4 Thu, 07 Nov 2002 22:27:37 +0100 lennart $ */ +/* $Id$ */ /* * This file is part of ifplugd. @@ -35,7 +35,7 @@ #include "ethtool-local.h" #include "interface.h" -#include "wireless.15.h" +#include "wireless.h" #include <libdaemon/dlog.h> diff --git a/src/nlapi.c b/src/nlapi.c index 33b222b..3fd0ed6 100644 --- a/src/nlapi.c +++ b/src/nlapi.c @@ -1,4 +1,4 @@ -/* $Id: ifplugd.c 1.12 Sat, 01 Feb 2003 03:00:07 +0100 lennart $ */ +/* $Id$ */ /* * This file is part of ifplugd. @@ -43,7 +43,7 @@ int nlapi_open(uint32_t groups) { struct sockaddr_nl addr; if ((nlapi_fd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE)) < 0) { - fprintf(stderr, "socket(PF_NETLINK): %s\n", strerror(errno)); + daemon_log(LOG_ERR, "socket(PF_NETLINK): %s\n", strerror(errno)); return -1; } @@ -54,7 +54,7 @@ int nlapi_open(uint32_t groups) { if (bind(nlapi_fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) { close(nlapi_fd); - fprintf(stderr, "bind(): %s\n", strerror(errno)); + daemon_log(LOG_ERR, "bind(): %s\n", strerror(errno)); return -1; } @@ -104,7 +104,6 @@ void nlapi_close(void) { close(nlapi_fd); nlapi_fd = -1; - while (callbacks) { struct callback_info *c = callbacks; callbacks = callbacks->next; diff --git a/src/wireless.h b/src/wireless.h new file mode 100644 index 0000000..0a4ef2e --- /dev/null +++ b/src/wireless.h @@ -0,0 +1,27 @@ +#ifndef foowirelesshfoo +#define foowirelesshfoo + +/* $Id$ */ + +/* + * This file is part of waproamd. + * + * waproamd is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * waproamd is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with waproamd; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +#include <linux/if.h> +#include "wireless.15.h" + +#endif |