diff --git a/etc/exports b/etc/exports new file mode 100644 index 000000000..c9f93c6a8 --- /dev/null +++ b/etc/exports @@ -0,0 +1,8 @@ +# /etc/exports +# +# See exports(5) for a description. + +# use exportfs -arv to reread +#/export 192.168.1.10(rw,no_root_squash) + + diff --git a/etc/inittab b/etc/inittab index 9e8cd198d..a97e60612 100644 --- a/etc/inittab +++ b/etc/inittab @@ -13,7 +13,7 @@ id:2:initdefault: rc::sysinit:/etc/rc.sysinit rh:06:wait:/etc/rc.shutdown -c0:2:respawn:/sbin/agetty -n -l /etc/login.sh 9600 ttyS0 linux +#c0:2:respawn:/sbin/agetty -n -l /etc/login.sh 9600 ttyS0 linux c1:2:respawn:/sbin/agetty -n -l /etc/login.sh 38400 vc/1 linux c2:2:respawn:/sbin/agetty -n -l /etc/login.sh 38400 vc/2 linux c3:2:respawn:/sbin/agetty -n -l /etc/login.sh 38400 vc/3 linux diff --git a/etc/pacman/core.pacman b/etc/pacman/core.pacman new file mode 100644 index 000000000..709d2c20f --- /dev/null +++ b/etc/pacman/core.pacman @@ -0,0 +1,68 @@ +# +# core: Arch Linux core repository +# +[core] +# North America +Server = ftp://ftp.archlinux.org/core/os/i686 +Server = ftp://ftp.nethat.com/pub/linux/archlinux/core/os/i686 +Server = ftp://ftp-linux.cc.gatech.edu/pub/linux/distributions/archlinux/core/os/i686 +Server = ftp://mirror.cs.vt.edu/pub/ArchLinux/core/os/i686 +Server = ftp://ftp.ibiblio.org/pub/linux/distributions/archlinux/core/os/i686 +Server = http://www2.cddc.vt.edu/linux/distributions/archlinux/core/os/i686 + +# Europe +# -Austria +Server = ftp://gd.tuwien.ac.at/opsys/linux/archlinux/core/os/i686 +# - Belgium +Server = ftp://ftp.belnet.be/packages/archlinux/core/os/i686 +# - Czech Republic +Server = ftp://ftp.sh.cvut.cz/MIRRORS/arch/core/os/i686 +# - Estonia +Server = ftp://ftp.estpak.ee/pub/archlinux/core/os/i686 +# - France +Server = ftp://ftp.rez-gif.supelec.fr/pub/Linux/distrib/archlinux/core/os/i686 +Server = ftp://mir1.archlinuxfr.org/archlinux/core/os/i686 +Server = ftp://mir2.archlinuxfr.org/archlinux/core/os/i686 +Server = ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/archlinux/core/os/i686 +Server = http://mirrors.jakimowicz.com/archlinux/core/os/i686 +# - Germany +Server = ftp://ftp.tu-chemnitz.de/pub/linux/sunsite.unc-mirror/distributions/archlinux/core/os/i686 +Server = ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/core/os/i686 +# - Great Britain +Server = http://ftp.parrswood.manchester.sch.uk/Mirrors/ftp.archlinux.org/core/os/i686 +# - Greece +Server = ftp://ftp.ntua.gr/pub/linux/archlinux/core/os/i686 +# - Ireland +Server = ftp://ftp.heanet.ie/mirrors/ftp.archlinux.org/core/os/i686 +# - Italy +Server = ftp://mi.mirror.garr.it/mirrors/archlinux/core/os/i686 +# - Netherlands +Server = ftp://ftp.nluug.nl/pub/metalab/distributions/archlinux/core/os/i686 +Server = ftp://ftp.surfnet.nl/pub/os/Linux/distr/archlinux/core/os/i686 +# - Norway +Server= ftp://mirror.djzradio.net/archlinux/core/os/i686 +# - Poland +Server = ftp://sunsite.icm.edu.pl/site/linux-sunsite/distributions/archlinux/core/os/i686 +Server = ftp://mirror.icis.pcz.pl/archlinux/core/os/i686 +# - Portugal +Server = ftp://gul.est.ips.pt/repos/archlinux/core/os/i686 +Server = ftp://cesium.di.uminho.pt/pub/archlinux/core/os/i686 +Server = http://darkstar.ist.utl.pt/archlinux/core/os/i686 +# - Romania +Server = ftp://ftp.iasi.roedu.net/mirrors/archlinux.org/core/os/i686 +# - Sweden +Server = ftp://ftp.ds.hj.se/pub/linux/distributions/archlinux/core/os/i686 +Server = ftp://ftp.gigabit.nu/core/os/i686 +# - Switzerland +Server = ftp://archlinux.puzzle.ch/core/os/i686 +# - Ukraine +Server = ftp://ftp.linux.kiev.ua/pub/Linux/ArchLinux/core/os/i686 + +# Australia +Server = ftp://mirror.pacific.net.au/linux/archlinux/core/os/i686 + +# Asia +Server = ftp://cle.linux.org.tw/pub/ArchLinux/core/os/i686 +Server = http://mirror.vxmatrix.net/ArchLinux/core/os/i686 +Server = http://dxmirror.vxmatrix.net/ArchLinux/core/os/i686 +Server = http://cncmirror.vxmatrix.net/ArchLinux/core/os/i686 \ No newline at end of file diff --git a/etc/pacman/pacman.conf.pacman b/etc/pacman/pacman.conf.pacman index 6517e6af6..9939cec44 100644 --- a/etc/pacman/pacman.conf.pacman +++ b/etc/pacman/pacman.conf.pacman @@ -16,13 +16,8 @@ # [options] LogFile = /var/log/pacman.log -NoUpgrade = etc/passwd etc/group etc/shadow etc/sudoers -NoUpgrade = etc/fstab etc/raidtab etc/ld.so.conf -NoUpgrade = etc/rc.conf etc/rc.local -NoUpgrade = etc/modprobe.conf etc/modules.conf -NoUpgrade = etc/lilo.conf boot/grub/menu.lst HoldPkg = pacman glibc -#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u +XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u # # REPOSITORIES @@ -34,9 +29,9 @@ HoldPkg = pacman glibc #[testing] #Server = ftp://ftp.archlinux.org/testing/os/i686 -[current] +[core] # Add your preferred servers here, they will be used first -Include = /etc/pacman.d/current +Include = /etc/pacman.d/core [extra] # Add your preferred servers here, they will be used first diff --git a/etc/ppp/options.pptp b/etc/ppp/options.pptp new file mode 100644 index 000000000..796849a05 --- /dev/null +++ b/etc/ppp/options.pptp @@ -0,0 +1,49 @@ +############################################################################### +# $Id$ +# +# Sample PPTP PPP options file /etc/ppp/options.pptp +# Options used by PPP when a connection is made by a PPTP client. +# This file can be referred to by an /etc/ppp/peers file for the tunnel. +# Changes are effective on the next connection. See "man pppd". +# +# You are expected to change this file to suit your system. As +# packaged, it requires PPP 2.4.2 or later from http://ppp.samba.org/ +# and the kernel MPPE module available from the CVS repository also on +# http://ppp.samba.org/, which is packaged for DKMS as kernel_ppp_mppe. +############################################################################### + +# Lock the port +lock + +# Authentication +# We don't need the tunnel server to authenticate itself +noauth + +# We won't do EAP, CHAP, or MSCHAP, but we will accept MSCHAP-V2 +refuse-eap +refuse-chap +refuse-mschap + +# Compression +# Turn off compression protocols we know won't be used +nobsdcomp +nodeflate + +# Encryption +# (There have been multiple versions of PPP with encryption support, +# choose with of the following sections you will use. Note that MPPE +# requires the use of MSCHAP-V2 during authentication) + +# http://ppp.samba.org/ the PPP project version of PPP by Paul Mackarras +# ppp-2.4.2 or later with MPPE only, kernel module ppp_mppe.o +# {{{ +# Require MPPE 128-bit encryption +#require-mppe-128 +# }}} + +# http://polbox.com/h/hs001/ fork from PPP project by Jan Dubiec +# ppp-2.4.2 or later with MPPE and MPPC, kernel module ppp_mppe_mppc.o +# {{{ +# Require MPPE 128-bit encryption +#mppe required,stateless +# }}} diff --git a/etc/start_udev b/etc/start_udev index 14d18d25b..7f6a8afa0 100755 --- a/etc/start_udev +++ b/etc/start_udev @@ -66,8 +66,12 @@ if [ ! -d $sysfs_dir/block ]; then exit 1 fi -# mount ramfs, else autodetection will fail! # not needed on install media! -# mount -t ramfs none $udev_root +# mount ramfs, else autodetection will fail! +mount -t ramfs none $udev_root +#create missing nodes +mknod /dev/null c 1 3 +mknod /dev/zero c 1 5 +mknod /dev/console c 5 1 # propogate /udev from /sys #echo "Creating initial udev device nodes:" diff --git a/etc/wlan/prism2_ssf.pda b/etc/wlan/prism2_ssf.pda new file mode 100644 index 000000000..40b5a59b3 --- /dev/null +++ b/etc/wlan/prism2_ssf.pda @@ -0,0 +1,12 @@ +; Minimal PDA file to get SSF cards operating. + +; (PDR 0002) PDA Version Record +; Version 8 +2 0002 0008 + +; NIC hardware description +;2 0400 0001 ; PE pcmcia, x8 RAM +;2 0400 0003 ; PE pcmcia, x16 RAM +;2 0400 0005 ; PE pci, x8 RAM +;2 0400 0007 ; PE pci, x16 RAM + diff --git a/etc/wlan/shared b/etc/wlan/shared new file mode 100644 index 000000000..400ac7c1f --- /dev/null +++ b/etc/wlan/shared @@ -0,0 +1,736 @@ +#!/bin/bash +# etc/wlan/shared +# +# Copyright (C) 2002 AbsoluteValue Systems, Inc. All Rights Reserved. +# -------------------------------------------------------------------- +# +# linux-wlan +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU Public License version 2 (the "GPL"), in which +# case the provisions of the GPL are applicable instead of the +# above. If you wish to allow the use of your version of this file +# only under the terms of the GPL and not to allow others to use +# your version of this file under the MPL, indicate your decision +# by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL. If you do not delete +# the provisions above, a recipient may use your version of this +# file under either the MPL or the GPL. +# +# -------------------------------------------------------------------- +# +# Inquiries regarding the linux-wlan Open Source project can be +# made directly to: +# +# AbsoluteValue Systems Inc. +# info@linux-wlan.com +# http://www.linux-wlan.com +# +# -------------------------------------------------------------------- +# +# Portions of the development of this software were funded by +# Intersil Corporation as part of PRISM(R) chipset product development. +# +# -------------------------------------------------------------------- + +TMPDIR=/tmp + +if [ ! -n "$ECHO" ]; then + ECHO=echo +fi + +if [ ! -n "$WLAN_UDEV" ] ; then +if [ -x /sbin/modprobe ] ; then + MODPROBE=/sbin/modprobe +else + ${ECHO} "/sbin/modprobe not found." + exit 1 +fi +fi + +if [ -x /sbin/wlanctl-ng ] ; then + WLANCTL=/sbin/wlanctl-ng +else + ${ECHO} "/sbin/wlanctl-ng not found." + exit 1 +fi + +# linux-wlan-ng > 0.2.4 there is no wland +#if [ -x /sbin/wland ] ; then +# WLAND=/sbin/wland +#else +# ${ECHO} "/sbin/wland not found." +# exit 1 +#fi + +if [ ! -n "$WLAN_UDEV" ] ; then +if [ -f /proc/sys/kernel/hotplug -a \ + -x `cat /proc/sys/kernel/hotplug` -a \ + -f /etc/hotplug/wlan.agent ] ; then + HAS_HOTPLUG=y +else + HAS_HOTPLUG=n +fi +fi + +# Source the wlan configuration +if [ -f /etc/wlan/wlan.conf ] ; then + . /etc/wlan/wlan.conf +else + ${ECHO} "/etc/wlan/wlan.conf not found." + exit 0 +fi + +# Source NSD specific functions +# nsd_fwload +# nsd_mibset +# Debian mod. If there is shared.dpkg-old we get a endless loop +if [ "`ls /etc/wlan/shared.* 2>/dev/null`" ]; then + for i in `find /etc/wlan -name 'shared.*' -and -not -name '*.dpkg*'` ; do + . $i + done +else + ${ECHO} "/etc/wlan/shared.* not found." + exit 0 +fi + +is_true () +{ + # $1 == string containing a t/f indicator. + + [ "$1" = "y" -o "$1" = "Y" -o "$1" = "yes" -o "$1" = "YES" \ + -o "$1" = "t" -o "$1" = "T" -o "$1" = "true" -o "$1" = "TRUE" ] +} + +wlan_nsdname () +{ + # $1 == wlandev + # Writes the given device's name to stdout + grep 'nsd name' /proc/net/p80211/$1/wlandev | sed -e 's/.*: \(.*\)_.*/\1/' +} + +wlan_enable () +{ + # $1 == wlandev + + #=======ENABLE IFSTATE============================= + # Bring the device into its operable state + + # if running under udev module must be loaded to get here so skip checks + if [ ! -n "$WLAN_UDEV" ] ; then + + $MODPROBE $1 + + # First, make sure the driver is loaded.... + if ! ifconfig $1 > /dev/null 2>&1 ; then + ${ECHO} "Error: Device $1 does not seem to be present." + ${ECHO} "Make sure you've inserted the appropriate" + ${ECHO} "modules or that your modules.conf file contains" + ${ECHO} "the appropriate aliase(s)." + return 1 + fi + fi + # Call the nsd script's fwload function, in case the card needs + # a firmware load, or could use an optional one. + + nsdname=`wlan_nsdname $1` + if ! ${nsdname}_fwload $1 ; then + ${ECHO} "Firmware failed to load for device $1" + return 1 + fi + + # Enable the interface + result=`$WLANCTL $1 lnxreq_ifstate ifstate=enable` + if [ $? = 0 ] ; then + eval $result + if [ $resultcode != "success" ]; then + ${ECHO} "Failed to enable the device, resultcode=" \ + $resultcode "." + return 1 + fi + else + ${ECHO} "Failed to enable the device, exitcode=" $? "." + return 1 + fi + + # Set any NSD specific MIBs + ${nsdname}_mibset $1 +} + +wlan_user_mibs () +{ + # $1 == wlandev + + #=======USER MIB SETTINGS============================= + # Set the user specified MIB items. + for i in $USER_MIBS ; do + result=`$WLANCTL $1 dot11req_mibset "mibattribute=$i"` + if [ $? = 0 ] ; then + eval $result + if [ $resultcode != "success" ] ; then + ${ECHO} "Failed to set user MIB $i." + return 1 + fi + else + ${ECHO} "Failed to set user MIB $i." + return 1 + fi + done +} + +wlan_source_config () +{ + # $1 == wlandev + + # XXX what about stray singlequotes. + eval 'GOSSID="$SSID_'$1'"' + wlan_source_config_for_ssid "$GOSSID" +} + +wlan_source_config_for_ssid () +{ + # $1 == ssid[:bssid] + # $2 == bssid (optional) + + DesiredSSID="$1" + DesiredBSSID="$2" + + if [ -n "$2" ] ; then + token_ssid=`echo $1 | sed -ne 's/\(.*\)\(:..:..:..:..:..:..\).*/\1/p'` + token_bssid=`echo $1 | sed -ne 's/\(.*\):\(..:..:..:..:..:..\).*/\2/p'` + if [ -n "$token_ssid" ] ; then + DesiredSSID="$token_ssid" + DesiredBSSID="$token_bssid" + fi + + fi + + if [ -f "/etc/wlan/wlancfg-$DesiredSSID:$DesiredBSSID" ] ; then + . "/etc/wlan/wlancfg-$DesiredSSID:$DesiredBSSID" + elif [ -f "/etc/wlan/wlancfg-$DesiredSSID" ] ; then + . "/etc/wlan/wlancfg-$DesiredSSID" + else + + if [ -n "$1" ] ; then + ${ECHO} "Failed to open network config file /etc/wlan/wlancfg-$1, using default." + fi + + . "/etc/wlan/wlancfg-DEFAULT" + fi +} + +wlan_disable () +{ + # $1 == wlandev + + $WLANCTL $1 lnxreq_ifstate ifstate=disable +} + +wlan_ssid_in_list () +{ + # $1 == wlandev, $2 == ssid, $3 == bssid + + eval 'GOSSID="$SSID_'$1'"' + + # This "eval" hackery is to allow escapes in GOSSID... + cmd="for token in $GOSSID ; do + ssid_token=\`echo \"\$token\" | sed -ne 's/\(.*\)\(:..:..:..:..:..:..\).*/\1/p'\` + bssid_token=\`echo \"\$token\" | sed -ne 's/\(.*\):\(..:..:..:..:..:..\).*/\2/p'\` + + if [ -z \"\$ssid_token\" ] ; then + ssid_token="\$token" + fi + + if [ -n \"\$bssid_token\" ] ; then + if [ \"\$bssid_token\" = \"\$3\" ] ; then + return 0 + fi + elif [ \"\$2\" = \"\$ssid_token\" ] ; then + return 0 + fi + done" + eval "$cmd" + + return 1 +} + +wlan_supports_scan () +{ + # $1 == wlandev + + if is_true "$WLAN_SCAN" ; then + cat /proc/net/p80211/$1/wlandev | grep 'scan' > /dev/null + if [ $? = 0 ] ; then + return 0 + fi + fi + return 1 +} + +wlan_scan () +{ + # $1 == wlandev + + # find our allowed SSID list. + + # XXX what about stray singlequotes. + eval 'GOSSID="$SSID_'$1'"' + + # kick off a quick scan with the broadcast SSID. + wlan_scan_one $1 '' '' n + if [ $? = 0 -a \ + "$GOSSID" = "" ] ; then + # if successful and our ssid list is null, return. + sleep 1 + return 0 + fi + + # otherwise we walk through the list, and scan for eacn in turn. + # this "eval" hackery is to allow escapes in GOSSID + cmd="for token in $GOSSID ; do + ssid_token=\`echo \"\$token\" | sed -ne 's/\(.*\)\(:..:..:..:..:..:..\).*/\1/p'\` + bssid_token=\`echo \"\$token\" | sed -ne 's/\(.*\):\(..:..:..:..:..:..\).*/\2/p'\` + + if [ -z \"\$ssid_token\" ] ; then + ssid_token=\"\$token\" + fi + + wlan_scan_one \$1 \"\$ssid_token\" \"\$bssid_token\" + if [ \$? = 0 ] ; then + sleep 1 + return 0 + fi + done" + eval "$cmd" + + # We got to the end of the list. Maybe try "any" + if is_true "$WLAN_ANY" ; then + wlan_scan_one $1 + sleep 1 + return $? + fi + + sleep 1 + return 1 +} + + +wlan_scan_one () +{ + # $1 == wlandev, [ $2 == ssid, $3 == bssid, $4 == append ] + + if [ -z "$4" ] ; then + append=true + else + append=false + fi + + numbss=0 + + result=`$WLANCTL $1 dot11req_scan bsstype=any bssid=ff:ff:ff:ff:ff:ff \ + scantype=active probedelay=0 channellist=$ChannelList ssid="$2" \ + minchanneltime=$ChannelMinTime maxchanneltime=$ChannelMaxTime append=$append` + eval $result + if [ $resultcode != 'success' ] ; then + ${ECHO} "Scan failed ($resultcode) " + return 1 + fi + + ## XXX if numbss == 0, repeat with $2 $3 $4? + + i=0 + bssfound="" + + # walk through the results and do first-cut matching. + while [ $i -lt $numbss ] ; do + result=`$WLANCTL $1 dot11req_scan_results bssindex=$i` + eval $result + + if [ -n "$3" ] ; then + if [ "$3" = "$bssid" ] ; then + bssfound="$bssfound $i" + fi + elif [ -z "$2" ] ; then + # if our ssid is "", then we pick the first entry. + bssfound="$bssfound $i" + elif [ "$2" = "$ssid" ] ; then + bssfound="$bssfound $i" + fi + i=`expr $i + 1` + done + + if [ -z "$bssfound" ]; then # No BSSs found, bail. + return 1 + else + # Now find the closest + bigsignal=0 + for i in $bssfound ; do + result=`$WLANCTL $1 dot11req_scan_results bssindex=$i` + eval $result + if [ $bigsignal -lt $signal ]; then + bigsignal=$signal + bigbssindex=$i + fi + done + result=`$WLANCTL $1 dot11req_scan_results bssindex=$bigbssindex` + eval $result + return 0 + fi +} + +wlan_wep () +{ + # $1 == wlandev + + #=======WEP=========================================== + # Setup privacy + if [ ${dot11PrivacyInvoked:-"false"} = "false" ] ; then + return 0; + fi + + result=`$WLANCTL $1 dot11req_mibget mibattribute=dot11PrivacyOptionImplemented` + if [ $? = 0 ] ; then + eval $result + eval $mibattribute + else + ${ECHO} "dot11PrivacyOptionImplemented mibget failed." + return 1 + fi + + if [ $dot11PrivacyOptionImplemented = "false" ] ; then + ${ECHO} "Cannot enable privacy, dot11PrivacyOptionImplemented=false." + return 1 + fi + + # Do we want host-based WEP? + result=`$WLANCTL $1 lnxreq_hostwep \ + decrypt="${lnxreq_hostWEPDecrypt:-false}" \ + encrypt="${lnxreq_hostWEPEncrypt:-false}"` + + # set up the rest of the parametsrs. + if [ $dot11PrivacyOptionImplemented = "true" -a \ + $dot11PrivacyInvoked = "true" ] ; then + result=`$WLANCTL $1 dot11req_mibset \ + mibattribute=dot11WEPDefaultKeyID=$dot11WEPDefaultKeyID ` + result=`$WLANCTL $1 dot11req_mibset \ + mibattribute=dot11ExcludeUnencrypted=$dot11ExcludeUnencrypted ` + result=`$WLANCTL $1 dot11req_mibset \ + mibattribute=dot11PrivacyInvoked=$dot11PrivacyInvoked` + if [ "${PRIV_GENSTR:-empty}" != "empty" ] ; then + if [ ${PRIV_KEY128:-"false"} = "false" ]; then + keys=`$PRIV_GENERATOR "$PRIV_GENSTR" 5` + else + keys=`$PRIV_GENERATOR "$PRIV_GENSTR" 13` + fi + knum=0 + for i in $keys ; do + result=`$WLANCTL $1 dot11req_mibset \ + mibattribute=dot11WEPDefaultKey$knum=$i` + knum=`expr $knum + 1` + done + else + result=`$WLANCTL $1 dot11req_mibset \ + mibattribute=dot11WEPDefaultKey0=$dot11WEPDefaultKey0 ` + result=`$WLANCTL $1 dot11req_mibset \ + mibattribute=dot11WEPDefaultKey1=$dot11WEPDefaultKey1 ` + result=`$WLANCTL $1 dot11req_mibset \ + mibattribute=dot11WEPDefaultKey2=$dot11WEPDefaultKey2 ` + result=`$WLANCTL $1 dot11req_mibset \ + mibattribute=dot11WEPDefaultKey3=$dot11WEPDefaultKey3 ` + fi + else + # disable wep explicitly. + result=`$WLANCTL $1 dot11req_mibset \ + mibattribute=dot11PrivacyInvoked=$dot11PrivacyInvoked ` + result=`$WLANCTL $1 dot11req_mibset \ + mibattribute=dot11ExcludeUnencrypted=false ` + fi +} + +wlan_adhoc () +{ + # $1 == wlandev + + #=======IBSS STARTUP================================== + startcmd="$WLANCTL $1 dot11req_start " + startcmd="$startcmd ssid=$DesiredSSID" + startcmd="$startcmd bsstype=independent" + startcmd="$startcmd beaconperiod=$BCNINT" + startcmd="$startcmd dtimperiod=3" + startcmd="$startcmd cfpollable=false" + startcmd="$startcmd cfpollreq=false" + startcmd="$startcmd cfpperiod=3" + startcmd="$startcmd cfpmaxduration=100" + startcmd="$startcmd probedelay=100" + startcmd="$startcmd dschannel=$CHANNEL" + j=1 + for i in $BASICRATES ; do + startcmd="$startcmd basicrate$j=$i" + j=`expr $j + 1` + done + + j=1 + for i in $OPRATES ; do + startcmd="$startcmd operationalrate$j=$i" + j=`expr $j + 1` + done + + results=`$startcmd` # Here's where it runs + if [ $? = 0 ]; then + eval $results + if [ $resultcode != "success" ] ; then + ${ECHO} "IBSS not started, resultcode=$resultcode" + exit 1 + else + ${ECHO} "IBSS mode started." + fi + else + ${ECHO} FAILED: $startcmd + return 1 + fi + WLAN_SCHEMESSID="$DesiredSSID" +} + +wlan_infra () +{ + # $1 == wlandev + + #==== INFRASTRUCURE STARTUP=========================== + # XXX TODO: Grok DesiredBSSID + + sleep 5 + results=`$WLANCTL $1 lnxreq_autojoin \ + "ssid=$DesiredSSID" \ + authtype=${AuthType:="opensystem"} | sed 's/\([^=]*\)=\(.*\)/\1="\2"/'` + eval $results + if [ ${resultcode:-"failure"} != "success" ] ; then + ${ECHO} 'error: Autojoin indicated failure!' + return 1; + fi + + WLAN_SCHEMESSID="$DesiredSSID" +} + +wlan_dot11_join () +{ + # $1 == wlandev + + joincmd="$WLANCTL $1 dot11req_join bssid=$DesiredBSSID" + joincmd="$joincmd joinfailuretimeout=1" + + j=1 + for i in $OPRATES ; do + joincmd="$joincmd operationalrate$j=$i" + j=`expr $j + 1` + done + + results=`$joincmd` + + eval $results + if [ ${resultcode:-"failure"} != "success" ] ; then + ${ECHO} "$1: JOIN Failure" + ${ECHO} "joincmd=$joincmd" + ${ECHO} "results=$results" + return 1; + fi +} + +wlan_dot11_auth_assoc () +{ + # $1 == wlandev + if [ $bsstype = "infrastructure" ] ; then + results=`$WLANCTL $1 dot11req_authenticate \ + peerstaaddress=$DesiredBSSID \ + authenticationtype=$AuthType \ + authenticationfailuretimeout=2000` + eval $results + if [ ${resultcode:-"failure"} != "success" ] ; then + ${ECHO} "error: dot11req_authenticate failed, "\ + "resultcode=$resultcode" + return 1; + fi + results=`$WLANCTL $1 dot11req_associate \ + listeninterval=1000 \ + associatefailuretimeout=2000 ` + if [ ${resultcode:-"failure"} != "success" ] ; then + ${ECHO} 'error: dot11req_associate failed!' + return 1; + fi + fi +} + +wlan_set_ssid_schemefile () +{ + # $1 == SSID + + # Find the scheme file + if [ -r /var/lib/misc/pcmcia-scheme ] ; then + # Debian + WLAN_SCHEMEFILE="/var/lib/misc/pcmcia-scheme" + elif [ -d /var/state/pcmcia ] ; then + WLAN_SCHEMEFILE="/var/state/pcmcia/scheme" + elif [ -d /var/lib/pcmcia ] ; then + WLAN_SCHEMEFILE="/var/lib/pcmcia/scheme" + else + WLAN_SCHEMEFILE="/var/run/pcmcia-scheme" + fi + + # Collect the current scheme name and save the file + if [ -r $WLAN_SCHEMEFILE ] ; then + WLAN_SCHEME=`cat $WLAN_SCHEMEFILE` + cp $WLAN_SCHEMEFILE /var/run/wlan_scheme_`date +"%T"`.tmp + else + touch /var/run/wlan_scheme_`date +"%T"`.tmp + + fi + + # Set up the string + if [ ! "$WLAN_SCHEME" ] ; then + WLAN_SCHEME="default" + fi + WLAN_SCHEME="$WLAN_SCHEME:$1" + + # Write to schemefile + echo $WLAN_SCHEME > $WLAN_SCHEMEFILE +} + +wlan_restore_schemefile () +{ + # Find the scheme file + if [ -r /var/lib/misc/pcmcia-scheme ] ; then + # Debian + WLAN_SCHEMEFILE="/var/lib/misc/pcmcia-scheme" + elif [ -d /var/state/pcmcia ] ; then + WLAN_SCHEMEFILE="/var/state/pcmcia/scheme" + elif [ -d /var/lib/pcmcia ] ; then + WLAN_SCHEMEFILE="/var/lib/pcmcia/scheme" + else + WLAN_SCHEMEFILE="/var/run/pcmcia-scheme" + fi + + TMPFILE=`ls /var/run/wlan_scheme*.tmp | tail -n 1` + + if [ -r $TMPFILE ] ; then + cat $TMPFILE > $WLAN_SCHEMEFILE + rm -f $TMPFILE + else + ${ECHO} "wlan_restore_schemefile: No wlan_scheme\*.tmp file found." + fi +} + +wlan_bring_it_up () +{ + # $1 == wlandev + # $2 == non-null if wext enabled. + + #=======ENABLE======================================== + # Do we want to init the card at all? + eval 'WLAN_ENABLE=$ENABLE_'$1 + + if ! is_true $WLAN_ENABLE ; then + return 1 + fi + + if wlan_enable $1 ; then + if [ -z "$2" ] ; then + wlan_scan_and_join $1 + return $? + else + ${ECHO} "Bypassing configuration due to wireless extensions" + fi + else + return 1; + fi + + return 1 +} + +wlan_scan_and_join () +{ + #=======MAC STARTUP========================================= + wlan_supports_scan $1 + if [ $? = 0 ] ; then + wlan_scan $1 + if [ $? = 0 ] ; then + wlan_source_config_for_ssid "$ssid" "$bssid" + + wlan_user_mibs $1 + wlan_wep $1 + + wlan_join $1 + else + if is_true $IS_ADHOC ; then + # start an IBSS; we didn't find one. + wlan_adhoc $1 + else + return 1 + fi + fi + else + wlan_source_config $1 + + wlan_user_mibs $1 + wlan_wep $1 + + if is_true $IS_ADHOC ; then + wlan_adhoc $1 + else + wlan_infra $1 + fi + fi + + return $? +} + +wlan_join () +{ + # $1 == wlandev + grep 'autojoin' /proc/net/p80211/$1/wlandev > /dev/null + if [ $? = 0 ]; then + wlan_infra $1 + else + wlan_dot11_join $1 + wlan_dot11_auth_assoc $1 + fi +} + +tmpname () +{ + # $1 == prefix + local i=0 + local tname=$TMPDIR/${1}_$$ + if [ -f ${tname}.tmp ] ; then + for i in 0 1 2 3 4 5 6 7 8 9 ; do + if [ ! -f ${tname}_${i}.tmp ] ; then + echo ${tname}_${i}.tmp + return 0 + fi + done + else + echo ${tname}.tmp + fi + return 0 +} + +source_procfile () +{ + # $1 == procfile to source + local fname=`tmpname wlan_procfile` + cat "$1" > $fname + . $fname + rm -f $fname +} + +# This is set by the Configure script as part of 'make install' +#FIRMWARE_DIR="/usr/share/linux-wlan" +FIRMWARE_DIR=/etc/wlan/ diff --git a/etc/wlan/shared.prism2 b/etc/wlan/shared.prism2 new file mode 100644 index 000000000..21b9e8a93 --- /dev/null +++ b/etc/wlan/shared.prism2 @@ -0,0 +1,112 @@ +# etc/wlan/shared.NSD +# +# Copyright (C) 2002 AbsoluteValue Systems, Inc. All Rights Reserved. +# -------------------------------------------------------------------- +# +# linux-wlan +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU Public License version 2 (the "GPL"), in which +# case the provisions of the GPL are applicable instead of the +# above. If you wish to allow the use of your version of this file +# only under the terms of the GPL and not to allow others to use +# your version of this file under the MPL, indicate your decision +# by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL. If you do not delete +# the provisions above, a recipient may use your version of this +# file under either the MPL or the GPL. +# +# -------------------------------------------------------------------- +# +# Inquiries regarding the linux-wlan Open Source project can be +# made directly to: +# +# AbsoluteValue Systems Inc. +# info@linux-wlan.com +# http://www.linux-wlan.com +# +# -------------------------------------------------------------------- +# This file contains NSD specific shell routines called from the +# global shell routines found in linux-wlan/etc. +# -------------------------------------------------------------------- + +PRISM2DL=/sbin/prism2dl + +prism2_fwload () +{ + # $1 == wlandev + # Perform NSD specific actions for loading f/w + + if [ ! -x $PRISM2DL ]; then + $ECHO $PRISM2DL not found, aborting firmware download. + return 0 + fi + + # figure out hwtype + initnichw="0007" # pci, 1x16 SRAM + source_procfile /proc/net/p80211/$1/nsd + + cp $FIRMWARE_DIR/prism2_ssf.pda /tmp + echo "2 0400 $initnichw" >> /tmp/prism2_ssf.pda + oldhw=$initnichw + + # figure out firmware image and dump it over. + + $WLANCTL $1 lnxreq_ifstate ifstate=fwload + HARDWARE=`$PRISM2DL -s $1 | grep 0x0008 | cut -c26-29` + case "$HARDWARE" in + 8002|8003|8004|8008) # (3841) + $PRISM2DL -r $FIRMWARE_DIR/prism2_r1.hex $1 + ;; + 800a|800b|8012|8016|801a|8021) # AMD Parallel Flash (3842) + $PRISM2DL -r $FIRMWARE_DIR/prism2_af.hex -r $FIRMWARE_DIR/prism2_rf.hex $1 + ;; + 800c|8013|8017|801b|8022) # SST Parallel Flash (3842) + $PRISM2DL -r $FIRMWARE_DIR/prism2_ak.hex -r $FIRMWARE_DIR/prism2_rf.hex $1 + ;; + 800e|8015|8019|801d|8024) # AT24C08 Small Serial Flash (3842) + $PRISM2DL -r $FIRMWARE_DIR/prism2_pm.hex -r $FIRMWARE_DIR/prism2_rf.hex $1 + ;; + 800d|800e|8014|8015|8019|801c|801d|8023|8024) + $PRISM2DL -r $FIRMWARE_DIR/prism2_rf.hex $1 + ;; + 800a|800f|8010|8011|801e|801f|8020|8025|8026|8027) # USB + $PRISM2DL -r $FIRMWARE_DIR/prism2_ru.hex $1 + ;; + *) + $ECHO "Unknown prism2 hardware type $HARDWARE ($hwtype), assuming SSF" + $PRISM2DL -p /tmp/prism2_ssf.pda -r $FIRMWARE_DIR/prism2_pm.hex $1 + + # double-check the hwtype + source_procfile /proc/net/p80211/$1/nsd + # if it doesn't line up, fix the PDA and try again. + if [ ! "$initnichw" = "$oldhw" ] ; then + cp $FIRMWARE_DIR/prism2_ssf.pda /tmp + echo "2 0400 $initnichw" >> /tmp/prism2_ssf.pda + $PRISM2DL -p /tmp/prism2_ssf.pda -r $FIRMWARE_DIR/prism2_pm.hex $1 + fi + + $PRISM2DL -r $FIRMWARE_DIR/prism2_pm.hex -r $FIRMWARE_DIR/prism2_rf.hex $1 + ;; + esac + + return $? +} + +prism2_mibset () +{ + # $1 == wlandev + # Global (always performed) NSD specific MIB settings. + return 0 +} + diff --git a/etc/wlan/wlan-udev.sh b/etc/wlan/wlan-udev.sh new file mode 100755 index 000000000..879dd140f --- /dev/null +++ b/etc/wlan/wlan-udev.sh @@ -0,0 +1,46 @@ +#! /bin/bash + + +# script to start prism2 wlan for fedora FC5 udev +#udev rule +#ACTION=="add",BUS=="usb",DRIVER=="prism2_usb",RUN+="/etc/wlan/wlan-udev.sh %k" + +# 01-01-2007 (rsk) add check for wlan_wext_write +# 31-01-2007 (rsk) get the check right this time :) + +WEXT_PARAM=/sys/module/p80211/parameters/wlan_wext_write + +DEVICE=$1 +WLAN_UDEV=1 + +. /etc/wlan/shared + +if [ -f $WEXT_PARAM ]; then + WLAN_WEXT=`cat $WEXT_PARAM` +fi + +if [ $WLAN_WEXT = 1 ]; then + wlan_bring_it_up $DEVICE TRUE + # set encrypt on card not host + result=`$WLANCTL $DEVICE lnxreq_hostwep decrypt="false" encrypt="false"` + if [ $? != 0 ]; then + echo "Cannot enable wep $result" + exit 1 + fi +else + echo calling wlan_bring_it_up + wlan_bring_it_up $DEVICE + + if [ $? = 0 ] ; then + echo $DEVICE start OK + #allow time during boot to let other things start + #sleep 5 + /sbin/ifup $DEVICE + else + echo $DEVICE failed to come up! >&2 + exit 1 + fi +fi +exit 0 + + diff --git a/etc/wlan/wlan.conf b/etc/wlan/wlan.conf new file mode 100644 index 000000000..fc8dcfa70 --- /dev/null +++ b/etc/wlan/wlan.conf @@ -0,0 +1,84 @@ +#! /bin/sh +# Wireless LAN adapter configuration +# +# etc/wlan/wlan.conf +# +# Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved. +# -------------------------------------------------------------------- +# +# linux-wlan +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU Public License version 2 (the "GPL"), in which +# case the provisions of the GPL are applicable instead of the +# above. If you wish to allow the use of your version of this file +# only under the terms of the GPL and not to allow others to use +# your version of this file under the MPL, indicate your decision +# by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL. If you do not delete +# the provisions above, a recipient may use your version of this +# file under either the MPL or the GPL. +# +# -------------------------------------------------------------------- +# +# Inquiries regarding the linux-wlan Open Source project can be +# made directly to: +# +# AbsoluteValue Systems Inc. +# info@linux-wlan.com +# http://www.linux-wlan.com +# +# -------------------------------------------------------------------- +# +# Portions of the development of this software were funded by +# Intersil Corporation as part of PRISM(R) chipset product development. +# +# -------------------------------------------------------------------- +# This file is sourced by all configuration scripts. +# +# The WLAN_DEVICES variable identifies the device names of each WLAN device. +# If you have more than one, make sure each one is identified in a whitespace +# separated list that's assigned to WLAN_DEVICES. + +WLAN_DEVICES="wlan0" + +# Below is the list of channels to scan, when we scan. +ChannelList="01:02:03:04:05:06:07:08:09:0a:0b:00:00:00" +# Below is the min and max time we linger on a channel during a scan. +ChannelMinTime=200 +ChannelMaxTime=250 +# And here we have the master scan toggle. +WLAN_SCAN=n + +# if you want temporary files to go elsewhere, change this. +TMPDIR=/tmp + +########## +# Note: To bind to a specific network, change the SSID to something different +# and create the file /etc/wlan/wlancfg- with your network- +# specific settings. If this file is not present, the settings in +# /etc/wlancfg/wlancfg-DEFAULT are used. +# +# for example: +# SSID_wlan0="linux-wlan" +# This expects a file called "/etc/wlan/wlancfg-linux-wlan" to be present. +# +# Use a SSID of "" to associate with any network in range. +######### + +SSID_wlan0="" +ENABLE_wlan0=y +#SSID_wlan1="" +#ENABLE_wlan1=n +#SSID_wlan2="" +#ENABLE_wlan2=n diff --git a/etc/wlan/wlancfg-DEFAULT b/etc/wlan/wlancfg-DEFAULT new file mode 100644 index 000000000..d91603429 --- /dev/null +++ b/etc/wlan/wlancfg-DEFAULT @@ -0,0 +1,43 @@ +#=======USER MIB SETTINGS============================= +# You can add the assignments for various MIB items +# of your choosing to this variable, separated by +# whitespace. The wlan-ng script will then set each one. +# Just uncomment the variable and set the assignments +# the way you want them. + +#USER_MIBS="p2CnfRoamingMode=1 p2CnfShortPreamble=mixed" + +#=======WEP=========================================== +# [Dis/En]able WEP. Settings only matter if PrivacyInvoked is true +lnxreq_hostWEPEncrypt=false # true|false +lnxreq_hostWEPDecrypt=false # true|false +dot11PrivacyInvoked=false # true|false +dot11WEPDefaultKeyID=0 # 0|1|2|3 +dot11ExcludeUnencrypted=true # true|false, in AP this means WEP is required. + +# If PRIV_GENSTR is not empty, use PRIV_GENTSTR to generate +# keys (just a convenience) +# add-ons/ in the tarball contains other key generators. +PRIV_GENERATOR=/sbin/nwepgen # nwepgen, Neesus compatible +PRIV_KEY128=false # keylength to generate +PRIV_GENSTR="" + +# or set them explicitly. Set genstr or keys, not both. +dot11WEPDefaultKey0= # format: xx:xx:xx:xx:xx or +dot11WEPDefaultKey1= # xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx +dot11WEPDefaultKey2= # e.g. 01:20:03:40:05 or +dot11WEPDefaultKey3= # 01:02:03:04:05:06:07:08:09:0a:0b:0c:0d +#=======SELECT STATION MODE=================== +IS_ADHOC=n # y|n, y - adhoc, n - infrastructure + +#======= INFRASTRUCTURE STATION =================== +# What kind of authentication? +AuthType="opensystem" # opensystem | sharedkey (requires WEP) + +#======= ADHOC STATION ============================ +BCNINT=100 # Beacon interval (in Kus) +CHANNEL=6 # DS channel for BSS (1-14, depends + # on regulatory domain) +BASICRATES="2 4" # Rates for mgmt&ctl frames (in 500Kb/s) +OPRATES="2 4 11 22" # Supported rates in BSS (in 500Kb/s) + diff --git a/hooks/arch_addons b/hooks/arch_addons index be88a08e9..c537bb9da 100644 --- a/hooks/arch_addons +++ b/hooks/arch_addons @@ -1,45 +1,56 @@ run_hook () { - # fix depmod link - ln -s /sbin/depmod /bin/depmod - ARCH_ADDON="optical storage floppy disk" - ### exclude kernel ntfs it seems broken! - echo "Disabling kernel NTFS module for mounting, due to known issues!" - mv /lib/modules/$(uname -r)/kernel/fs/ntfs/ntfs.ko /lib/modules/$(uname -r)/kernel/fs/ntfs/ntfs.ko.old - echo " Waiting 10 seconds for usb/fw devices to come ready ..." - sleep 10 - for i in $ARCH_ADDON; do - echo "Checking $i devices for addons ..." - for k in $(find /dev -maxdepth 1 -group "$i"); do - if mount $k /addons > /dev/null 2>&1; then - echo "Looking for new config files on $k, checking /config directory ..." - if [ -d "/addons/config" ]; then - echo "Copying new config files to /etc install environment ..." - cp -r /addons/config/* /etc/ - echo "Finished." - RETRIGGER_UDEV="1" - else - echo "No files found to copy in /config directory on media $i." + if grep -qw arch-addons /proc/cmdline; then + ARCH_ADDON="optical storage floppy disk" + ### exclude kernel ntfs it seems broken! + echo "Disabling kernel NTFS module for mounting, due to known issues!" + mv /lib/modules/$(uname -r)/kernel/fs/ntfs/ntfs.ko /lib/modules/$(uname -r)/kernel/fs/ntfs/ntfs.ko.old + echo " Waiting 10 seconds for usb/fw devices to come ready ..." + sleep 10 + for i in $ARCH_ADDON; do + echo "Checking $i devices for addons ..." + for k in $(find /dev -maxdepth 1 -group "$i"); do + if mount $k /addons > /dev/null 2>&1; then + echo "Looking for new config files on $k, checking /config directory ..." + if [ -d "/addons/config" ]; then + echo "Copying new config files to /etc install environment ..." + cp -r /addons/config/* /etc/ + echo "Finished." + RETRIGGER_UDEV="1" + else + echo "No files found to copy in /config directory on media $i." + fi + echo "Looking for new packages to install on $k, checking /packages directory ..." + if [ -d "/addons/packages" ]; then + mkdir /tmp/packages/ + echo "Copying new packages to /tmp/packages/ install environment ..." + cp /addons/packages/*.pkg.tar.gz /tmp/packages/ + echo "Installing new packages to install environment ..." + pacman -A /tmp/packages/* || echo "Dependency resolution failed!" + RETRIGGER_UDEV="1" + else + echo "No new files found to copy and install in /packages directory on media $k." + fi + umount /addons + sleep 2 fi - echo "Looking for new packages to install on $k, checking /packages directory ..." - if [ -d "/addons/packages" ]; then - mkdir /tmp/packages/ - echo "Copying new packages to /tmp/packages/ install environment ..." - cp /addons/packages/*.pkg.tar.gz /tmp/packages/ - echo "Installing new packages to install environment ..." - pacman -A /tmp/packages/* || echo "Dependency resolution failed!" - RETRIGGER_UDEV="1" - else - echo "No new files found to copy and install in /packages directory on media $k." - fi - umount /addons - sleep 2 - fi - done - done - mv /lib/modules/$(uname -r)/kernel/fs/ntfs/ntfs.ko.old /lib/modules/$(uname -r)/kernel/fs/ntfs/ntfs.ko - if [ "$RETRIGGER_UDEV" = "1" ]; then - echo "Retrigger udev uevents ..." - /etc/start_udev uevents + done + done + mv /lib/modules/$(uname -r)/kernel/fs/ntfs/ntfs.ko.old /lib/modules/$(uname -r)/kernel/fs/ntfs/ntfs.ko + if [ "$RETRIGGER_UDEV" = "1" ]; then + echo "Retrigger udev uevents ..." + /etc/start_udev uevents + fi + else + echo "ARCH_ADDONS USAGE:" + echo "------------------" + echo "By default loading is disabled!" + echo "In order to load external addon packages or configs" + echo "into install environment, please append arch-addons to boot prompt." + echo "Place external addon packages in /packages directory." + echo "Place external configs in /config directory." + echo "------------------" + echo "" + sleep 10 fi } diff --git a/hooks/arch_base b/hooks/arch_base index 6259f2ea1..de7ff71b9 100644 --- a/hooks/arch_base +++ b/hooks/arch_base @@ -9,4 +9,6 @@ run_hook () ln -s /bin/chroot /usr/bin/chroot ln -s /sbin/killall5 /bin/pidof ln -s /usr/bin/netcat /usr/bin/nc + # fix depmod link + ln -s /sbin/depmod /bin/depmod } diff --git a/hooks/arch_intel_wireless b/hooks/arch_intel_wireless new file mode 100644 index 000000000..b405317a2 --- /dev/null +++ b/hooks/arch_intel_wireless @@ -0,0 +1,27 @@ +run_hook () +{ + if grep -qw intel-wireless /proc/cmdline; then + echo "ARCH_INTEL_WIRELESS:" + echo "--------------------" + echo "You ACCEPTED the intel's licenses, intel wireless drivers are now available." + ! [ -d /lib/firmware/ ] && mkdir -p /lib/firmware + mv /intel-firmware/* /lib/firmware/ + echo "Retrigger udev uevents ..." + /etc/start_udev uevents + else + echo "ARCH_INTEL_WIRELESS USAGE:" + echo "--------------------" + echo "By default intel wireless loading is disabled!" + echo "In order to use those drivers you have to agree to intel's licenses" + echo "and append intel-wireless to boot prompt." + echo "" + echo "License files for the drivers are located here:" + echo "/usr/share/licenses/iwlwifi-4965-ucode/LICENSE" + echo "/usr/share/licenses/iwlwifi-3945-ucode/LICENSE" + echo "/lib/firmware/LICENSE.ipw2200-fw" + echo "/lib/firmware/LICENSE.ipw2100-fw" + echo "By appending intel-wireless to boot prompt you accept those licenses!" + echo "--------------------" + sleep 15 + fi +} diff --git a/hooks/arch_licenses b/hooks/arch_licenses new file mode 100644 index 000000000..3f39837dc --- /dev/null +++ b/hooks/arch_licenses @@ -0,0 +1,6 @@ +run_hook () +{ + # fix license symlinks + ln -s /usr/share/licenses/common/LGPL /usr/share/licenses/common/LGPL2 + ln -s /usr/share/licenses/common/GPL /usr/share/licenses/common/GPL2 +} diff --git a/hooks/arch_pacman b/hooks/arch_pacman new file mode 100644 index 000000000..9ffe3f36a --- /dev/null +++ b/hooks/arch_pacman @@ -0,0 +1,7 @@ +run_hook () +{ + # fix download source + for i in /etc/pacman.d/*; do + sed -i -e "s/i686/$(uname -m)/g" $i + done +} diff --git a/hooks/arch_remote b/hooks/arch_remote index 8fb6ab6d4..36bb9409d 100644 --- a/hooks/arch_remote +++ b/hooks/arch_remote @@ -8,4 +8,6 @@ run_hook () ln -s $(find /usr/bin/screen-*) /usr/bin/screen # fix daemons sed -i -e 's|^DAEMONS=(@syslog-ng)|DAEMONS=(@syslog-ng @network @portmap @sshd @xinetd)|g' /etc/rc.conf + # fix serial console + dmesg | grep tty >/dev/null && sed -i -e 's/^#c0/c0/g' /etc/inittab } diff --git a/hooks/arch_wireless b/hooks/arch_wireless new file mode 100644 index 000000000..a7e86c430 --- /dev/null +++ b/hooks/arch_wireless @@ -0,0 +1,5 @@ +run_hook () +{ + #fix perl symlink + ln -s /usr/lib/perl5/current /usr/lib/perl5/5.8.8 +} diff --git a/install.conf b/install.conf index 5df60c612..43a60991e 100644 --- a/install.conf +++ b/install.conf @@ -6,15 +6,14 @@ MODULES="" BINARIES="" FILES="" # SETUP -# You can choose between 3 types of install media: -# arch-base-install --> creates base install media +# You can choose between 2 types of install media: +# arch-core-install --> creates core install media # arch-ftp-install --> creates ftp install media -# arch-current-install --> creates full current install media # # default is set to ftp install media # # Please change the other hooks only if you know what you are doing. -HOOKS="arch_ftp_install arch_acpi arch_bootmessage arch_motd arch_memtest arch_pam arch_shadow arch_base arch_hwdetect arch_udev ide pata scsi sata arch_net arch_isdn arch_pcmcia arch_rtc arch_sound usb usbinput fw arch_floppy arch_raid arch_lvm2 arch_encrypt arch_filesystems arch_keymap arch_remote arch_cpufreq arch_fb arch_links arch_naim arch_pacman arch_addons arch_kexec arch_ppp arch_pppoe arch_lilo arch_grub arch_iptables arch_capi4k arch_pciutils arch_usbutils arch_openvpn arch_vpnc" +HOOKS="arch_ftp_install arch_acpi arch_bootmessage arch_motd arch_memtest arch_pam arch_shadow arch_base arch_hwdetect arch_udev ide pata scsi sata arch_net arch_isdn arch_pcmcia arch_rtc arch_sound usb usbinput fw arch_floppy arch_raid arch_lvm2 arch_encrypt arch_filesystems arch_keymap arch_remote arch_cpufreq arch_fb arch_links arch_naim arch_pacman arch_addons arch_kexec arch_ppp arch_pppoe arch_lilo arch_grub arch_iptables arch_capi4k arch_pciutils arch_usbutils arch_openvpn arch_vpnc arch_pptpclient arch_licenses arch_wireless arch_intel_wireless" # # adding pxelinux hook if mkpxelinux is used. if [ "${RUNPROGRAM}" = "mkpxelinux" ]; then @@ -26,9 +25,10 @@ fi # the default install media creating process, uses latest files from online cvs! # #SERVER PARAMETERS -FTPSERVER="ftp://ftp.archlinux.org/current/os" +FTPSERVER="ftp://ftp.archlinux.org/core/os" # CVS SERVER -CVSSETUP=":pserver:anonymous:anonymous@cvs.archlinux.org:/home/cvs-arch" +ARCH_CVSSETUP=":pserver:anonymous:anonymous@cvs.archlinux.org:/home/cvs-arch" +CVSSETUP=":pserver:anonymous:anonymous@cvs.archlinux.org:/home/cvs-core" # CVS TAG TAG="CURRENT" @@ -52,49 +52,47 @@ LOCALSETUP="no" # cvs -z3 co arch/scripts/{km,setup,quickinst} # cvs -z3 co arch/doc/en/guide/install/arch-install-guide.txt # cvs -z3 co arch/misc/bootdisk/2/mirrors.txt -# ### needed for base install media -# cvs -z3 co -r ${TAG} arch/build/base/ -# cvs -z3 co -r ${TAG} arch/build/kernels/ -# ### needed for current install media -# cvs -z3 co -r ${TAG} arch/build/ +# export CVSROOT=":pserver:anonymous:anonymous@cvs.archlinux.org:/home/cvs-core" +# cvs -z3 co -r ${TAG} core/ # --------------- # Now you can start to modify this tree to your needs. ### GENERAL REMASTER PARAMETERS # enter here your custom/modified cvs tree CVSTREE="" +ARCH_CVSTREE="" # path to keyboard layout change script -KMSCRIPT="${CVSTREE}/arch/scripts/km" +KMSCRIPT="${ARCH_CVSTREE}/arch/scripts/km" # path to setup script -SETUP="${CVSTREE}/arch/scripts/setup" +SETUP="${ARCH_CVSTREE}/arch/scripts/setup" # path to quickinst script -QUICKINST="${CVSTREE}/arch/scripts/quickinst" +QUICKINST="${ARCH_CVSTREE}/arch/scripts/quickinst" # path to file which include the mirrors -MIRRORS="${CVSTREE}/arch/misc/bootdisk/2/mirrors.txt" +MIRRORS="${ARCH_CVSTREE}/arch/misc/bootdisk/2/mirrors.txt" # path to documentation file -DOCUMENTATION="${CVSTREE}/arch/doc/en/guide/install/arch-install-guide.txt" +DOCUMENTATION="${ARCH_CVSTREE}/arch/doc/en/guide/install/arch-install-guide.txt" # path to built packages PACKAGEDIR="" # path to static pacman # download it from: -# ftp://ftp.archlinux.org/current/os//setup/pacman.pkg.tar.gz +# ftp://ftp.archlinux.org/core/os//setup/pacman.pkg.tar.gz # or build it on your own ;) PACMANBINARY="" # path to rc.sysinit to get arch version -RCSYSINIT="${CVSTREE}/arch/build/base/initscripts/rc.sysinit" +RCSYSINIT="${CVSTREE}/core/base/initscripts/rc.sysinit" #### REMASTER FTP INSTALL MEDIA # No extra parameters needed -#### REMASTER BASE/CURRENT INSTALL MEDIA +#### REMASTER CORE INSTALL MEDIA ### main cvs dir for base install # Note: the MAINCVSDIR dir must include a 'base' and 'kernels' directory -MAINCVSDIR="${CVSTREE}/arch/build" +MAINCVSDIR="${CVSTREE}/core" diff --git a/install/arch_base b/install/arch_base index 1da678138..ea4ae842f 100644 --- a/install/arch_base +++ b/install/arch_base @@ -29,7 +29,7 @@ install () ### adding needed programs from running system add_file "${CONFIG}" "/config" SCRIPT="arch_base" - BINARIES="init agetty mount modprobe modinfo umount basename du clear env head id md5sum nano netcat printf tail tee test tr tty uptime wc which whoami xargs yes syslog-ng bash swapon uniq cut seq snarf find sort fdisk sfdisk cfdisk gawk cp mv shutdown free ls rm sed test less chgrp chmod chown date df dialog dmesg egrep fgrep grep hostname kill killall killall5 more ps pwd rmdir stty sync tar touch uname vi lsmod modinfo rmmod hdparm true mktemp chroot dirname expr bzip2 hwclock depmod su cat cpio dd gzip wget top" + BINARIES="init agetty mount modprobe modinfo umount basename du clear env head id md5sum nano netcat printf tail tee test tr tty uptime wc which whoami xargs yes syslog-ng bash swapon uniq cut seq snarf find sort fdisk sfdisk cfdisk gawk cp mv shutdown free ls rm sed test less chgrp chmod chown date df dialog dmesg egrep fgrep grep hostname kill killall killall5 more ps pwd rmdir stty sync tar touch uname vi lsmod modinfo rmmod hdparm true mktemp chroot dirname expr bzip2 hwclock depmod su cat cpio dd gzip wget top sdparm" add_file "/bin/echo" add_file "/bin/gunzip" add_file "/bin/zcat" diff --git a/install/arch_core_install b/install/arch_core_install new file mode 100644 index 000000000..11504b987 --- /dev/null +++ b/install/arch_core_install @@ -0,0 +1,155 @@ +# Created by Tobias Powalowski + +install () +{ + ### check for root + if ! [ $UID -eq 0 ]; then + echo "ERROR: only works when run as root!" + exit 1 + fi + ### check for activated testing repository + if ! [ "$(grep '^\[testing\]' /etc/pacman.conf)" = "" ]; then + echo "WARNING: TESTING REPOSITORY ACTIVATED" + echo "-------------------------------------" + echo "POSSIBILITY OF BROKEN BINARY PACKAGES ON INSTALL MEDIA!" + echo "Use a chroot instead to avoid those problems." + echo "5 seconds time to cancel with CTRL+C" + sleep 5 + fi + ### begin cvs part + if ! [ "${LOCALSETUP}" = "yes" ]; then + CVSTREE=$(mktemp /tmp/corecvs.XXXX) + ARCH_CVSTREE=$(mktemp /tmp/archcvs.XXXX) + rm ${CVSTREE} + rm ${ARCH_CVSTREE} + mkdir -p ${CVSTREE} + mkdir -p ${ARCH_CVSTREE} + # checkout actual core cvs + export CVSROOT=${CVSSETUP} + else + CVSTREE=${CVSTREE} + ARCH_CVSTREE=${ARCH_CVSTREE} + fi + cd ${CVSTREE} + if ! [ "${LOCALSETUP}" = "yes" ]; then + cvs -z3 co -r ${TAG} core/ + MAINCVSDIR="${CVSTREE}/core" + cd ${MAINCVSDIR} + SEARCHCVS=$(find ./ -type d ! -name "CVS") + else + cd ${MAINCVSDIR} + SEARCHCVS=$(find ./ -type d ! -name "CVS") + fi + + if ! [ "${TEMPDIR}" = "" ]; then + mkdir -p ${TEMPDIR}/core/pkg/ + # Download all packages + PACKAGES=$(for i in ${SEARCHCVS};do ! [ "$(echo $i | awk -F/ '{print $3}')" = "" ] && echo -n "core/$(echo $i| awk -F/ '{print $3}') ";done) + if ! [ "${LOCALSETUP}" = "yes" ]; then + pacman -Sy + if ! [ "$(pacman -Sw --noconfirm ${PACKAGES})" ]; then + echo "ABORTING: Something went wrong in package retrieving or md5sum check." + exit 1 + fi + else + DBGENERATE="$(mktemp /tmp/db-generate.XXX)" + rm ${DBGENERATE} + mkdir -p ${DBGENERATE} + gensync ${MAINCVSDIR}/ ${DBGENERATE}/core.db.tar.gz ${PACKAGEDIR} + PACMANREPO="$(mktemp /tmp/pacman-repo.XXX)" + rm ${PACMANREPO} + mkdir -p ${PACMANREPO} + mount --bind ${PACKAGEDIR} ${PACMANREPO} + mv ${DBGENERATE}/core.db.tar.gz ${PACMANREPO}/ + rm -r ${DBGENERATE} + PACMANCONF="$(mktemp /tmp/pacman-conf.XXX)" + echo "[core]" >> ${PACMANCONF} + echo "Server = file://${PACMANREPO}" >> ${PACMANCONF} + pacman -Sy --config ${PACMANCONF} + if ! [ "$(pacman -Sw --noconfirm --config ${PACMANCONF} ${PACKAGES})" ]; then + echo "ABORTING: Something went wrong in package retrieving or md5sum check." + umount ${PACMANREPO} + exit 1 + fi + fi + # collect the packages + cd ${MAINCVSDIR} + for COPY in ${SEARCHCVS};do + if ! [ "$(echo ${COPY} | awk -F/ '{print $3}')" = "" ]; then + source "${COPY}/PKGBUILD" + cp /var/cache/pacman/pkg/${pkgname}-${pkgver}-${pkgrel}.pkg.tar.gz ${TEMPDIR}/core/pkg/ + echo "$(echo ${COPY}| awk -F/ '{print $2}')/${pkgname}-${pkgver}-${pkgrel}.pkg.tar.gz" >> ${TEMPDIR}/core/pkg/packages.txt + fi + done + # generate packages.txt + sort -u ${TEMPDIR}/core/pkg/packages.txt -o ${TEMPDIR}/core/pkg/packages.txt + fi + SCRIPT= + BINARIES= + # always needed for every install + cd ${ARCH_CVSTREE} + if ! [ "${LOCALSETUP}" = "yes" ]; then + export CVSROOT={$ARCH_CVSSETUP} + cvs -z3 co arch/scripts/{km,setup,quickinst} + cvs -z3 co arch/doc/en/guide/install/ARCH_install-guide.txt + cvs -z3 co arch/misc/bootdisk/2/mirrors.txt + fi + # fix km script + KM=$(mktemp /tmp/km.XXXX) + if ! [ "${LOCALSETUP}" = "yes" ]; then + cp -f ${ARCH_CVSTREE}/arch/scripts/km ${KM} + else + cp -f ${KMSCRIPT} ${KM} + fi + sed -i -e 's#$BASEDIR/keymaps/##g' ${KM} + chmod 755 ${KM} + mkdir -p ${TEMPDIR}/arch + add_file "${KM}" "/bin/km" + # fix mirrors.txt + if ! [ "${LOCALSETUP}" = "yes" ]; then + sed -i -e "s/i686/$(uname -m)/g" ${ARCH_CVSTREE}/arch/misc/bootdisk/2/mirrors.txt + add_file "${ARCH_CVSTREE}/arch/scripts/setup" "/arch/setup" + add_file "${ARCH_CVSTREE}/arch/scripts/quickinst" "/arch/quickinst" + add_file "${ARCH_CVSTREE}/arch/misc/bootdisk/2/mirrors.txt" "/arch/mirrors.txt" + else + sed -i -e "s/i686/$(uname -m)/g" ${MIRRORS} + add_file "${SETUP}" "/arch/setup" + add_file "${QUICKINST}" "/arch/quickinst" + add_file "${MIRRORS}" "/arch/mirrors.txt" + fi + DOCS=$(mktemp /tmp/docs.XXXX) + if ! [ "${LOCALSETUP}" = "yes" ]; then + cp -f ${ARCH_CVSTREE}/arch/doc/en/guide/install/ARCH_install-guide.txt ${DOCS} + else + cp -f ${DOCUMENTATION} ${DOCS} + fi + gzip -9 ${DOCS} + add_file "${DOCS}.gz" "/arch/archdoc.txt.gz" + add_dir "/src" + if ! [ "${LOCALSETUP}" = "yes" ]; then + if ! [ "${TEMPDIR}" = "" ]; then + cp ${ARCH_CVSTREE}/arch/doc/en/guide/install/ARCH_install-guide.txt ${TEMPDIR}/arch/archdoc.txt + cd ${TEMPDIR}/arch/pkg/setup/ + #wget ${FTPSERVER}/$(uname -m)/setup/pacman.pkg.tar.gz + cd ${TEMPDIR}/core/pkg/ + wget ${FTPSERVER}/$(uname -m)/core.db.tar.gz + fi + else + if ! [ "${TEMPDIR}" = "" ]; then + cp -f ${DOCUMENTATION} ${TEMPDIR}/arch/archdoc.txt + #cp -f ${PACMANBINARY} ${TEMPDIR}/arch/pkg/setup/ + mv ${PACMANREPO}/core.db.tar.gz ${TEMPDIR}/core/pkg/ + umount ${PACMANREPO} + fi + fi + + # generate iso title name + [ "${RUNPROGRAM}" = "mkbootcd" -o "${RUNPROGRAM}" = "mkbootcd-grub" ] && echo "Arch Linux CORE $(uname -m)" >> ${ISONAME} +} + +help () +{ +cat < + +install () +{ + MODULES="" + + BINARIES="" + FILES="" + SCRIPT="arch_intel_wireless" + # ipw2100 support + add_file "/lib/firmware/ipw2100-1.3-i.fw" "/intel-firmware/ipw2100-1.3-i.fw" + add_file "/lib/firmware/ipw2100-1.3-p.fw" "/intel-firmware/ipw2100-1.3-p.fw" + add_file "/lib/firmware/LICENSE.ipw2100-fw" + add_file "/lib/firmware/LICENSE.ipw2100-fw" + # ipw2200 support + add_file "/lib/firmware/ipw2200-bss.fw" "/intel-firmware/ipw2200-bss.fw" + add_file "/lib/firmware/ipw2200-ibss.fw" "/intel-firmware/ipw2200-ibss.fw" + add_file "/lib/firmware/ipw2200-sniffer.fw" "/intel-firmware/ipw2200-sniffer.fw" + add_file "/lib/firmware/LICENSE.ipw2200-fw" + # iwlwifi support + add_file "/usr/share/licenses/iwlwifi-3945-ucode/LICENSE" + add_file "/lib/firmware/iwlwifi-3945-1.ucode" "/intel-firmware/iwlwifi-3945-1.ucode" + add_file "/lib/firmware/iwlwifi-3945.ucode" "/intel-firmware/iwlwifi-3945.ucode" + add_file "/usr/share/licenses/iwlwifi-4965-ucode/LICENSE" + add_file "/lib/firmware/iwlwifi-4965-1.ucode" "/intel-firmware/iwlwifi-4965-1.ucode" + add_file "/lib/firmware/iwlwifi-4965.ucode" "/intel-firmware/iwlwifi-4965.ucode" +} + +help () +{ +cat< + +install () +{ + MODULES="" + BINARIES="" + FILES="" + SCRIPT="arch_licenses" + for i in $(find /usr/share/licenses/common ! -type d -type f); do + add_file $i + done +} + +help () +{ +cat< + +install () +{ + MODULES="" + BINARIES="pptp" + FILES="" + SCRIPT="" + add_file "/etc/archboot/etc/ppp/options.pptp" "/etc/ppp/options.pptp" + +} + +help () +{ +cat< + +install () +{ + MODULES=" $(checked_modules "/drivers/net/wirless/") " + + BINARIES="iwconfig iwevent iwgetid iwlist iwpriv iwspy bcm43xx-fwcutter wpa_cli wpa_passphrase wpa_supplicant 80211debug 80211stats athchans athctrl athdebug athkey athstats wlanconfig nwepgen prism2dl wlancfg wlanctl-ng loadndisdriver perl" + FILES="" + SCRIPT="arch_wireless" + add_file "/etc/archboot/etc/conf.d/wireless_conf.d" "/etc/conf.d/wireless" + add_file "/etc/archboot/etc/wpa_supplicant.conf" "/etc/wpa_supplicant.conf" + # add madwifi support + add_file "/usr/bin/madwifi-unload" + # add ralink firmware files + add_file "/lib/firmware/rt2561.bin" + add_file "/lib/firmware/rt2561s.bin" + add_file "/lib/firmware/rt2661.bin" + add_file "/lib/firmware/rt73.bin" + # add zd1211 firmware files + for i in /lib/firmware/zd1211/* ; do + add_file "$i" + done + # add wlan-ng26 support + add_file "/etc/rc.d/wlan" + for i in /etc/archboot/etc/wlan/*; do + add_file "/etc/wlan/$(basename $i)" + done + for i in /etc/wlan/*.hex; do + add_file "$i" + done + # add ndiswrapper support + add_file "/usr/lib/perl5/current/File/Path.pm" + add_file "/usr/lib/perl5/current/File/Spec/Unix.pm" + add_file "/usr/lib/perl5/current/File/Spec.pm" + add_file "/usr/lib/perl5/current/File/Copy.pm" + add_file "/usr/lib/perl5/current/File/Basename.pm" + add_file "/usr/lib/perl5/current/Exporter/Heavy.pm" + add_file "/usr/lib/perl5/current/AutoLoader.pm" + add_file "/usr/lib/perl5/current/Carp.pm" + add_file "/usr/lib/perl5/current/Carp/Heavy.pm" + add_file "/usr/lib/perl5/current/warnings.pm" + add_file "/usr/lib/perl5/current/warnings/register.pm" + add_file "/usr/lib/perl5/current/vars.pm" + add_file "/usr/lib/perl5/current/Exporter.pm" + add_file "/usr/lib/perl5/current/strict.pm" + add_file "/usr/lib/perl5/current/$(uname -m)-linux-thread-multi/Cwd.pm" + add_file "/usr/lib/perl5/current/$(uname -m)-linux-thread-multi/auto/Cwd/Cwd.bs" + add_file "/usr/lib/perl5/current/$(uname -m)-linux-thread-multi/auto/Cwd/Cwd.so" + add_file "/usr/lib/perl5/current/$(uname -m)-linux-thread-multi/auto/Fcntl/Fcntl.bs" + add_file "/usr/lib/perl5/current/$(uname -m)-linux-thread-multi/auto/Fcntl/Fcntl.so" + add_file "/usr/lib/perl5/current/$(uname -m)-linux-thread-multi/auto/DynaLoader/dl_find_symbol_anywhere.al" + add_file "/usr/lib/perl5/current/$(uname -m)-linux-thread-multi/auto/DynaLoader/dl_expandspec.al" + add_file "/usr/lib/perl5/current/$(uname -m)-linux-thread-multi/auto/DynaLoader/extralibs.ld" + add_file "/usr/lib/perl5/current/$(uname -m)-linux-thread-multi/auto/DynaLoader/autosplit.ix" + add_file "/usr/lib/perl5/current/$(uname -m)-linux-thread-multi/auto/DynaLoader/DynaLoader.a" + add_file "/usr/lib/perl5/current/$(uname -m)-linux-thread-multi/auto/DynaLoader/dl_findfile.al" + add_file "/usr/lib/perl5/current/$(uname -m)-linux-thread-multi/Config.pm" + add_file "/usr/lib/perl5/current/$(uname -m)-linux-thread-multi/DynaLoader.pm" + add_file "/usr/lib/perl5/current/$(uname -m)-linux-thread-multi/XSLoader.pm" + add_file "/usr/lib/perl5/current/$(uname -m)-linux-thread-multi/Fcntl.pm" +} + +help () +{ +cat<