From 43de5cdf5eae6ca14ad57023865c1dbca6bf847c Mon Sep 17 00:00:00 2001
From: Lennart Poettering
Date: Sun, 8 Feb 2004 20:18:25 +0000
Subject: starts ifup/ifdown directly
git-svn-id: file:///home/lennart/svn/public/waproamd/trunk@70 022f378f-78c4-0310-b860-d162c87e6274
---
Makefile.am | 13 +++++++++----
conf/default.in | 21 ++++++++++++---------
conf/waproamd.conf | 2 +-
configure.ac | 6 +++---
doc/README.html.in | 23 +++++++++++++++++------
src/waproamd.c | 1 -
waproamd.spec.in | 47 +++++++++++++++++++++++++++++++++++++++++++++++
7 files changed, 89 insertions(+), 24 deletions(-)
create mode 100644 waproamd.spec.in
diff --git a/Makefile.am b/Makefile.am
index d02e325..a5e6e2c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -16,20 +16,25 @@
# along with waproamd; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-EXTRA_DIST=bootstrap.sh README LICENSE
+EXTRA_DIST=bootstrap.sh README LICENSE waproamd.spec waproamd.spec.in
SUBDIRS=src conf doc man
-MAINTAINERCLEANFILES = README
-noinst_DATA = README
+MAINTAINERCLEANFILES = README waproamd.spec
+noinst_DATA = README waproamd.spec
README:
rm -f README
$(MAKE) -C doc README
cd $(srcdir) && ln -s doc/README README
-homepage:
+homepage: all dist
test -d $$HOME/homepage/lennart
mkdir -p $$HOME/homepage/lennart/projects/waproamd
cp *.tar.gz $$HOME/homepage/lennart/projects/waproamd
cp man/waproamd.8.xml man/waproamd.conf.5.xml man/xmltoman.css man/xmltoman.xsl doc/style.css doc/README.html $$HOME/homepage/lennart/projects/waproamd/
cp $$HOME/homepage/lennart/projects/waproamd/README.html $$HOME/homepage/lennart/projects/waproamd/index.html
+
+distcleancheck:
+ @:
+
+.PHONY: homepage distcleancheck
diff --git a/conf/default.in b/conf/default.in
index 39d32d7..07c237c 100755
--- a/conf/default.in
+++ b/conf/default.in
@@ -42,25 +42,25 @@ done
case "$1.$METHOD" in
start.aes)
- aeswepd -i $IFACE -w -F "$KEYDIR/$FILE.aes"
- iwconfig $IFACE key on
+ aeswepd -i "$IFACE" -w -F "$KEYDIR/$FILE.aes"
+ iwconfig "$IFACE" key on 2> /dev/null
;;
stop.aes)
- aeswepd -i $IFACE -kW
- iwconfig $IFACE key off
+ aeswepd -i "$IFACE" -kW
+ iwconfig "$IFACE" key off 2> /dev/null
;;
start.wep)
KEY="$(cat $KEYDIR/$FILE.wep)"
- iwconfig $IFACE key "$KEY"
- iwconfig $IFACE key [1] 2> /dev/null
- iwconfig $IFACE key restricted 2> /dev/null
- iwconfig $IFACE key on 2> /dev/null
+ iwconfig "$IFACE" key "$KEY"
+ iwconfig "$IFACE" key [1] 2> /dev/null
+ iwconfig "$IFACE" key restricted 2> /dev/null
+ iwconfig "$IFACE" key on 2> /dev/null
;;
*.open|stop.wep)
- iwconfig $IFACE key off
+ iwconfig "$IFACE" key off 2> /dev/null
;;
*)
echo "Unknown command\n" > /dev/stderr
@@ -68,4 +68,7 @@ case "$1.$METHOD" in
;;
esac
+[ "$1" = "start" ] && exec /sbin/ifup "$IFACE"
+[ "$1" = "stop" ] && exec /sbin/ifdown "$IFACE"
+
exit 0
diff --git a/conf/waproamd.conf b/conf/waproamd.conf
index 35d1ee1..cc1b7fd 100644
--- a/conf/waproamd.conf
+++ b/conf/waproamd.conf
@@ -29,7 +29,7 @@ INTERFACES="wlan0"
# Additional parameters for waproamd.
# (Run "waproamd -h" for further information.)
-ARGS="-wM"
+ARGS="-wMU"
# Additional parameters for waproamd for the specified interface. Note
# that $ARGS is ignored, when a variable like this is set for an
diff --git a/configure.ac b/configure.ac
index 9d99e2b..87a1f74 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,7 +20,7 @@
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
AC_PREREQ(2.59)
-AC_INIT([waproamd],[0.5b],[mzjncebnzq (at) 0pointer (dot) de])
+AC_INIT([waproamd],[0.6],[mzjncebnzq (at) 0pointer (dot) de])
AC_CONFIG_SRCDIR([src/waproamd.c])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign -Wall])
@@ -59,7 +59,7 @@ AC_FUNC_MEMCMP
AC_FUNC_SELECT_ARGTYPES
AC_CHECK_FUNCS([dup2 ftruncate memset select setenv socket strchr strcspn strdup strerror strrchr])
-PKG_CHECK_MODULES(LIBDAEMON, [ libdaemon >= 0.4 ])
+PKG_CHECK_MODULES(LIBDAEMON, [ libdaemon >= 0.5 ])
AC_SUBST(LIBDAEMON_CFLAGS)
AC_SUBST(LIBDAEMON_LIBS)
@@ -124,5 +124,5 @@ fi
AM_CONDITIONAL([USE_XMLTOMAN], [test "x$xmltoman" = xyes])
-AC_CONFIG_FILES([src/Makefile Makefile conf/Makefile doc/Makefile man/Makefile doc/README.html])
+AC_CONFIG_FILES([src/Makefile Makefile conf/Makefile doc/Makefile man/Makefile doc/README.html waproamd.spec])
AC_OUTPUT
diff --git a/doc/README.html.in b/doc/README.html.in
index 7cbc20a..dc5178c 100644
--- a/doc/README.html.in
+++ b/doc/README.html.in
@@ -42,6 +42,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+Sun Feb 8 2004:
Version 0.6 released, added spec file, disable host roaming by default, the default configuration doesn't rely on ifplugd anymore
+
Mon Jan 26 2004:
Version 0.5b released, added missing file.
@@ -72,11 +75,17 @@ own package, add documentation, several bug fixes.
Linux wireless extensions. It is intended to configure the WEP
keys according to the networks found.
-waproamd is intended to be used together with ifplugd. Whenever
-an association succeeds, ifplugd detects it and runs further
-configuration commands for it.
+Due to driver and stability issues, starting from version 0.5
+ifplugd is no longer recommended for joint use with
+waproamd. The default action scripts of waproamd are
+modified accordingly: they run ifup/ifdown on their
+own behalf when a new network became available or and old one is
+lost. If you like you may still use waproamd and
+ifplugd on the same interface together, but you have to
+modify the default configuration to reflect that.
-An alternative implementation of a tool like this is wlandetect.
+An alternative implementation of a tool like this is wlandetect.
@@ -112,7 +121,9 @@ scan". If the driver supports the wireless event subsystem,
waproamd may use it to improve latency behaviour. It is not required,
however.
-waproamd supports the host_roaming private ioctl() as defined by the hostap driver.
+waproamd supports the host_roaming private
+ioctl() as defined by the hostap driver.
Don't forget to install a firewall on your computer, since
waproamd will try to log into any network it finds with
@@ -185,7 +196,7 @@ for it.
-Thomas Hood, Norbert Preining, Herbert Graeber, Fabrice Bellet for patches
+Thomas Hood, Norbert Preining, Herbert Graeber, Fabrice Bellet, Sean Reifschneider for patches
Oliver Kurth for packaging waproamd for Debian
diff --git a/src/waproamd.c b/src/waproamd.c
index aa3381f..5850ff7 100644
--- a/src/waproamd.c
+++ b/src/waproamd.c
@@ -517,7 +517,6 @@ int go(struct interface *i) {
finish:
daemon_log(LOG_INFO, "Shutdown");
-
set_current_ap(i, NULL);
diff --git a/waproamd.spec.in b/waproamd.spec.in
new file mode 100644
index 0000000..84ef8e1
--- /dev/null
+++ b/waproamd.spec.in
@@ -0,0 +1,47 @@
+%define debug_package %{nil}
+
+Summary: Daemon which configures 802.11b networking by scanning for available networks.
+Name: waproamd
+Version: @PACKAGE_VERSION@
+Release: 1
+URL: http://0pointer.de/lennart/projects/waproamd/
+Source: %{name}-%{version}.tar.gz
+License: GPL
+Group: Networking/Daemons
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+BuildPrereq: libdaemon-devel
+
+%description
+waproamd is a roaming daemon for wireless IEEE 802.11 NICs supporting
+the Linux wireless extensions. It is intended to configure the WEP keys
+according to the networks found.
+
+An alternative implementation of a tool like this is wlandetect.
+
+%prep
+%setup -q
+
+%build
+%configure
+make
+
+%install
+[ ! -z "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
+%makeinstall sysvinitdir="$RPM_BUILD_ROOT"/etc/rc.d/init.d
+
+%clean
+[ ! -z "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%doc LICENSE README
+%config /etc/waproamd/waproamd.conf
+%config /etc/waproamd/scripts/default
+/usr/sbin/waproamd
+/etc/rc.d/init.d/waproamd
+%{_mandir}/man5/waproamd.conf.5.gz
+%{_mandir}/man8/waproamd.8.gz
+
+%changelog
+* Fri Jan 30 2004 Sean Reifschneider [0.5b-1]
+- Initial .spec creation.
--
cgit