Tried to make hostapd to run without configuration in blue0 and madwifi
authormaniacikarus <maniacikarus.ipfire.org>
Tue, 29 Jul 2008 06:00:36 +0000 (08:00 +0200)
committermaniacikarus <maniacikarus.ipfire.org>
Tue, 29 Jul 2008 06:00:36 +0000 (08:00 +0200)
config/backup/includes/hostapd [new file with mode: 0644]
config/hostapd/hostapd.conf [new file with mode: 0644]
config/rootfiles/packages/hostapd
doc/packages-list.txt
lfs/hostapd
lfs/v4l-dvb
make.sh
src/initscripts/init.d/hostapd [new file with mode: 0644]
src/paks/hostapd/install.sh [new file with mode: 0644]
src/paks/hostapd/uninstall.sh [new file with mode: 0644]
src/paks/hostapd/update.sh [new file with mode: 0644]

diff --git a/config/backup/includes/hostapd b/config/backup/includes/hostapd
new file mode 100644 (file)
index 0000000..f619800
--- /dev/null
@@ -0,0 +1 @@
+/etc/hostapd.conf
diff --git a/config/hostapd/hostapd.conf b/config/hostapd/hostapd.conf
new file mode 100644 (file)
index 0000000..642b682
--- /dev/null
@@ -0,0 +1,15 @@
+interface=blue0
+driver=madwifi
+auth_algs=3
+wpa=1
+wpa_passphrase=IPFire
+wpa_key_mgmt=WPA-PSK
+wpa_pairwise=TKIP CCMP
+debug=0
+logger_syslog=-1
+logger_syslog_level=2
+dump_file=/tmp/hostapd.dump
+ctrl_interface=/var/run/hostapd
+ctrl_interface_group=0
+ssid=IPFire
+macaddr_acl=0
index 269ec23..f0acfa8 100644 (file)
@@ -1,2 +1,5 @@
+etc/hostapd.conf
+etc/init.d/hostapd
 usr/bin/hostapd
 usr/bin/hostapd_cli
+var/ipfire/backup/addons/includes/hostapd
index f5a3079..8a9066f 100644 (file)
 * usbutils-0.72
 * util-linux-2.12r
 * v4l-dvb-9ff62c80bf4c
+* v4l-dvb-e9a442d3b53a
 * vdr-1.6.0
 * vim-7.0
 * vlan.1.9
index b4639b9..e58e4b9 100644 (file)
@@ -32,7 +32,7 @@ DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = hostapd
-PAK_VER    = 1
+PAK_VER    = 2
 
 DEPS       = ""
 
@@ -81,5 +81,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        cd $(DIR_APP) && cp $(DIR_SRC)/config/hostapd/config ./.config
        cd $(DIR_APP) && sed -e "s@/usr/local@/usr@g" -i Makefile
        cd $(DIR_APP) && make && make install
+       cp -vrf $(DIR_SRC)/config/hostapd/hostapd.conf /etc/hostapd.conf
+       install -v -m 644 $(DIR_SRC)/config/backup/includes/hostapd /var/ipfire/backup/addons/includes/hostapd
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
index 5dd5ef4..f189e2e 100644 (file)
 
 include Config
 
-VER        = 9ff62c80bf4c
+VER        = e9a442d3b53a
 
 THISAPP    = v4l-dvb-$(VER)
 DL_FILE    = $(THISAPP).tar.bz2
 DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
+PAK_VER    = 2
 ifeq "$(SMP)" "1"
        TARGET     = $(DIR_INFO)/$(THISAPP)-smp
 else
@@ -45,7 +46,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = eeb6a77c1ef26bc05a5d4cdba5a5167b
+$(DL_FILE)_MD5 = e4d9fccd3e3c242d1dce59bc5ecd2c51
 
 install : $(TARGET)
 
diff --git a/make.sh b/make.sh
index 3302773..df382ce 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -859,7 +859,7 @@ gettoolchain)
                cd $BASEDIR/cache/toolchains
                wget $URL_TOOLCHAIN/$PACKAGE.tar.gz $URL_TOOLCHAIN/$PACKAGE.md5 >& /dev/null
                if [ $? -ne 0 ]; then
-                       echo "`date -u '+%b %e %T'`: error downloading toolchain for $BUILDMACHINE machine" | tee -a $LOGFILE
+                       echo "`date -u '+%b %e %T'`: error downloading $PACKAGE toolchain for $BUILDMACHINE machine" | tee -a $LOGFILE
                else
                        if [ "`md5sum $PACKAGE.tar.gz | awk '{print $1}'`" = "`cat $PACKAGE.md5 | awk '{print $1}'`" ]; then
                                echo "`date -u '+%b %e %T'`: toolchain md5 ok" | tee -a $LOGFILE
diff --git a/src/initscripts/init.d/hostapd b/src/initscripts/init.d/hostapd
new file mode 100644 (file)
index 0000000..87b08bb
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/sh
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+case "${1}" in
+        start)
+                /usr/local/bin/wlanconfig ath0 destroy
+                /usr/local/bin/wlanconfig blue0 create wlandev wifi0 wlanmode ap
+                /usr/sbin/iwconfig blue0 channel 05
+                /usr/bin/hostapd -P /var/run/hostapd /etc/hostapd.conf &
+                evaluate_retval
+                ;;
+
+        stop)
+                # Just make shure when going down the first time blue0 nw values are ignored
+                                                               sed -i -e 's/^ACTION=="add", SUBSYSTEM=="net", SYSFS{address}=="*", NAME="blue0"*/#ACTION=="add", SUBSYSTEM=="net", SYSFS{address}=="*", NAME="blue0"*/' /etc/udev/rules.d/30-persistent-network.rules
+                /usr/local/bin/wlanconfig blue0 destroy
+                killproc /usr/bin/hostapd
+                evaluate_retval
+                ;;
+
+        restart)
+                ${0} stop
+                sleep 1
+                ${0} start
+                ;;
+
+        status)
+                statusproc /usr/bin/hostapd
+                ;;
+
+        *)
+                echo "Usage: ${0} {start|stop|restart|status}"
+                exit 1
+                ;;
+esac
diff --git a/src/paks/hostapd/install.sh b/src/paks/hostapd/install.sh
new file mode 100644 (file)
index 0000000..9a9aef1
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire 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.                                      #
+#                                                                          #
+# IPFire 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 IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+extract_files
+restore_backup ${NAME}
+ln -s ../init.d/hostap /etc/rc.d/rc3.d/S18hostap
+ln -s ../init.d/hostap /etc/rc.d/rc0.d/K81hostap
+ln -s ../init.d/hostap /etc/rc.d/rc6.d/K81hostap
+start_service --background ${NAME}
diff --git a/src/paks/hostapd/uninstall.sh b/src/paks/hostapd/uninstall.sh
new file mode 100644 (file)
index 0000000..f2e528e
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire 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.                                      #
+#                                                                          #
+# IPFire 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 IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+stop_service ${NAME}
+make_backup ${NAME}
+rm -rf /etc/rc.d/rc*.d/*hostap
+remove_files
diff --git a/src/paks/hostapd/update.sh b/src/paks/hostapd/update.sh
new file mode 100644 (file)
index 0000000..89c40d0
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire 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.                                      #
+#                                                                          #
+# IPFire 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 IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+./uninstall.sh
+./install.sh