From ddd268c9719c641880a7966de3f1f2fe82e97725 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Mon, 22 Oct 2007 06:31:53 +0000 Subject: [PATCH] 'upgpkg: added torrent creation to scripts, added latest initscript changes, updated udev.rules, unload already loaded intel wireless drivers first, added release name to config files instead of rc.sysinit check' --- etc/inittab | 10 +++++----- etc/rc.conf | 14 ++++++++++++-- etc/rc.shutdown | 9 +++++---- etc/rc.sysinit | 11 +++++++++++ etc/udev.rules | 4 ++-- hooks/arch_addons | 1 + hooks/arch_intel_wireless | 6 ++++++ install-lowmem.conf | 2 +- install.conf | 2 +- install/arch_base | 2 +- install/arch_base_lowmem | 2 +- install/arch_bootmessage | 15 ++------------- install/arch_bootmessage_lowmem | 15 ++------------- 13 files changed, 50 insertions(+), 43 deletions(-) diff --git a/etc/inittab b/etc/inittab index a97e60612..7775a86da 100644 --- a/etc/inittab +++ b/etc/inittab @@ -13,11 +13,11 @@ 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 -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 -c4:2:respawn:/sbin/agetty -n -l /etc/login.sh 38400 vc/4 linux +#c0:2:respawn:/sbin/agetty -8 -n -l /etc/login.sh 9600 ttyS0 linux +c1:2:respawn:/sbin/agetty -8 -n -l /etc/login.sh 38400 vc/1 linux +c2:2:respawn:/sbin/agetty -8 -n -l /etc/login.sh 38400 vc/2 linux +c3:2:respawn:/sbin/agetty -8 -n -l /etc/login.sh 38400 vc/3 linux +c4:2:respawn:/sbin/agetty -8 -n -l /etc/login.sh 38400 vc/4 linux ca::ctrlaltdel:/sbin/shutdown -t3 -r now diff --git a/etc/rc.conf b/etc/rc.conf index da3bb3e9d..2b2d99c43 100644 --- a/etc/rc.conf +++ b/etc/rc.conf @@ -21,9 +21,10 @@ USECOLOR="yes" # # Note: to use DHCP, set your interface to be "dhcp" (eth0="dhcp") # -lo="lo 127.0.0.1" +# Don't use this for wireless interfaces, see network profiles below +# eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255" -INTERFACES=(lo !eth0) +INTERFACES=(!eth0) # # Routes to start at boot-up (in this order) @@ -32,6 +33,15 @@ INTERFACES=(lo !eth0) # gateway="default gw 192.168.0.1" ROUTES=(!gateway) +# +# Enable these network profiles at boot-up. These are only useful +# if you happen to need multiple network configurations (ie, laptop users) +# - set to 'menu' to present a menu during boot-up (dialog package required) +# - prefix an entry with a ! to disable it +# +# Network profiles are found in /etc/network-profiles +# +#NET_PROFILES=(main) # ----------------------------------------------------------------------- # DAEMONS diff --git a/etc/rc.shutdown b/etc/rc.shutdown index a094ca1e2..8e045a339 100755 --- a/etc/rc.shutdown +++ b/etc/rc.shutdown @@ -11,15 +11,16 @@ echo "Shutting Down ..." # Shutdown daemons let i=${#DAEMONS[@]} -while [[ i -ge 0 ]]; do - if [[ `echo ${DAEMONS[$i]} | grep '^[^\!]' | wc -l` -eq 1 ]]; then - /etc/rc.d/${DAEMONS[$i]#@} stop + +while [ $i -ge 0 ]; do + if [ "${DAEMONS[$i]:0:1}" != '!' ]; then + ck_daemon ${DAEMONS[$i]#@} || /etc/rc.d/${DAEMONS[$i]#@} stop fi let i=i-1 done # find any leftover daemons and shut them down if [ -d /var/run/daemons ]; then - for daemon in `ls /var/run/daemons`; do + for daemon in $(ls -1t /var/run/daemons); do /etc/rc.d/$daemon stop done fi diff --git a/etc/rc.sysinit b/etc/rc.sysinit index 0d00b2b95..c5643194b 100755 --- a/etc/rc.sysinit +++ b/etc/rc.sysinit @@ -14,6 +14,17 @@ else /bin/dmesg -n 3 fi +# bring up the loopback interface +if [ -d /sys/class/net/lo ]; then + stat_busy "Bringing up loopback interface" + ifconfig lo 127.0.0.1 up + if [ $? -ne 0 ]; then + stat_fail + else + stat_done + fi +fi + # Start daemons for daemon in "${DAEMONS[@]}"; do if [ "$daemon" = "${daemon#!}" ]; then diff --git a/etc/udev.rules b/etc/udev.rules index 2132b1e9d..8855f2fae 100644 --- a/etc/udev.rules +++ b/etc/udev.rules @@ -206,7 +206,7 @@ KERNEL=="psaux", NAME="misc/%k", SYMLINK+="%k" KERNEL=="agpgart", NAME="misc/%k", SYMLINK+="%k" GROUP="video" KERNEL=="uinput", NAME="misc/%k", SYMLINK+="%k" KERNEL=="random", MODE="0666" -KERNEL=="urandom", MODE="0444" +KERNEL=="urandom", MODE="0666" KERNEL=="mem", MODE="0640", GROUP="kmem" KERNEL=="kmem", MODE="0640", GROUP="kmem" KERNEL=="port", MODE="0640", GROUP="kmem" @@ -342,7 +342,7 @@ KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODE KERNEL=="hd*[0-9]", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n" KERNEL=="sd*[!0-9]|sr*|st*", ATTRS{ieee1394_id}=="?*", ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_SUBSYSTEMS}="ieee1394" -KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="/lib/udev/usb_id --export" +KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", SUBSYSTEMS=="usb", IMPORT{program}="/lib/udev/usb_id --export" KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="/lib/udev/scsi_id --export --whitelisted --fallback-to-sysfs -s %p -d $tempnode" KERNEL=="cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}=="", IMPORT{program}="/lib/udev/scsi_id --export --whitelisted --ignore-sysfs -s %p -d $tempnode", ENV{ID_BUS}="cciss" KERNEL=="sd*[!0-9]|sr*|cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" diff --git a/hooks/arch_addons b/hooks/arch_addons index c537bb9da..38db2b36c 100644 --- a/hooks/arch_addons +++ b/hooks/arch_addons @@ -50,6 +50,7 @@ run_hook () echo "Place external addon packages in /packages directory." echo "Place external configs in /config directory." echo "------------------" + echo "Message is displayed 10 seconds ..." echo "" sleep 10 fi diff --git a/hooks/arch_intel_wireless b/hooks/arch_intel_wireless index b405317a2..15cd4f669 100644 --- a/hooks/arch_intel_wireless +++ b/hooks/arch_intel_wireless @@ -6,6 +6,11 @@ run_hook () 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 "Unloading already loaded intel wireless modules ..." + modprobe -r ipw2100 > /dev/null 2>&1 + modprobe -r ipw2200 > /dev/null 2>&1 + modprobe -r iwl3945 > /dev/null 2>&1 + modprobe -r iwl4965 > /dev/null 2>&1 echo "Retrigger udev uevents ..." /etc/start_udev uevents else @@ -22,6 +27,7 @@ run_hook () echo "/lib/firmware/LICENSE.ipw2100-fw" echo "By appending intel-wireless to boot prompt you accept those licenses!" echo "--------------------" + echo "Message is displayed 15 seconds ..." sleep 15 fi } diff --git a/install-lowmem.conf b/install-lowmem.conf index 789c8c422..c92599938 100644 --- a/install-lowmem.conf +++ b/install-lowmem.conf @@ -88,7 +88,7 @@ PACKAGEDIR="" PACMANBINARY="" # path to rc.sysinit to get arch version -RCSYSINIT="${CVSTREE}/core/base/initscripts/rc.sysinit" +ARCHVERSION="Core Dump" #### REMASTER FTP INSTALL MEDIA # No extra parameters needed diff --git a/install.conf b/install.conf index 43a60991e..3e02d0419 100644 --- a/install.conf +++ b/install.conf @@ -87,7 +87,7 @@ PACKAGEDIR="" PACMANBINARY="" # path to rc.sysinit to get arch version -RCSYSINIT="${CVSTREE}/core/base/initscripts/rc.sysinit" +ARCHVERSION="Core Dump" #### REMASTER FTP INSTALL MEDIA # No extra parameters needed diff --git a/install/arch_base b/install/arch_base index ea4ae842f..2c78bfb34 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 sdparm" + 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 tput" add_file "/bin/echo" add_file "/bin/gunzip" add_file "/bin/zcat" diff --git a/install/arch_base_lowmem b/install/arch_base_lowmem index 206b01029..89e4ca3e3 100644 --- a/install/arch_base_lowmem +++ b/install/arch_base_lowmem @@ -29,7 +29,7 @@ install () ### adding needed programs from running system add_file "${CONFIG}" "/config" SCRIPT="arch_base_lowmem" - BINARIES="init agetty mount modprobe umount head basename clear nano printf tail test tty wc which xargs yes syslog-ng bash swapon uniq cut seq find sort fdisk sfdisk cfdisk gawk cp mv shutdown ls rm sed less chgrp chmod chown df dialog dmesg egrep fgrep grep kill killall killall5 more ps pwd rmdir stty sync tar touch uname hdparm true mktemp chroot dirname bzip2 hwclock depmod cat gzip sdparm expr" + BINARIES="init agetty mount modprobe umount head basename clear nano printf tail test tty wc which xargs yes syslog-ng bash swapon uniq cut seq find sort fdisk sfdisk cfdisk gawk cp mv shutdown ls rm sed less chgrp chmod chown df dialog dmesg egrep fgrep grep kill killall killall5 more ps pwd rmdir stty sync tar touch uname hdparm true mktemp chroot dirname bzip2 hwclock depmod cat gzip sdparm expr tput" add_file "/bin/echo" add_file "/bin/gunzip" add_file "/bin/zcat" diff --git a/install/arch_bootmessage b/install/arch_bootmessage index 0843bd457..eb1ddde77 100644 --- a/install/arch_bootmessage +++ b/install/arch_bootmessage @@ -10,18 +10,7 @@ install () # change to english locale! export LANG=en_US CONFIGMSG="INSTALLATION / RESCUEBOOT SYSTEM" - if ! [ "${LOCALSETUP}" = "yes" ]; then - CVSMSG=$(mktemp /tmp/archmsg.XXXX) - rm ${CVSMSG} - mkdir -p ${CVSMSG} - # checkout actual name from cvs rc.sysinit - export CVSROOT=${ARCH_CVSSETUP} - cd ${CVSMSG} - cvs -z3 co -r ${TAG} arch/build/base/initscripts/rc.sysinit - NAME=$(grep 'Arch' arch/build/base/initscripts/rc.sysinit | sed -e 's/printhl "//g' -e 's/$C_OTHER(${C_H2}//g' -e 's/\\n"//g' -e 's/$C_OTHER)//g') - else - NAME=$(grep 'Arch' ${RCSYSINIT} | sed -e 's/printhl "//g' -e 's/$C_OTHER(${C_H2}//g' -e 's/\\n"//g' -e 's/$C_OTHER)//g') - fi + NAME=${ARCHVERSION} echo "Arch Linux" >> ${BOOTMESSAGE} echo "http://www.archlinux.org" >> ${BOOTMESSAGE} echo "Copyright 2002 - 2007 Judd Vinet " >> ${BOOTMESSAGE} @@ -31,7 +20,7 @@ install () echo "Creation Tool: '$(echo ${RUNPROGRAM} | sed 's|-grub||')' written by Tobias Powalowski " >> ${BOOTMESSAGE} echo "" >> ${BOOTMESSAGE} echo "${CONFIGMSG}" >> ${BOOTMESSAGE} - echo "${NAME}" >> ${BOOTMESSAGE} + echo "Arch Linux ${NAME}" >> ${BOOTMESSAGE} echo "Kernel: ${USEKERNEL}" >> ${BOOTMESSAGE} echo "Architecture: $(uname -m)" >> ${BOOTMESSAGE} echo "Creation Date: $(date)" >> ${BOOTMESSAGE} diff --git a/install/arch_bootmessage_lowmem b/install/arch_bootmessage_lowmem index dadbf0704..0175419f1 100644 --- a/install/arch_bootmessage_lowmem +++ b/install/arch_bootmessage_lowmem @@ -10,18 +10,7 @@ install () # change to english locale! export LANG=en_US CONFIGMSG="INSTALLATION SYSTEM" - if ! [ "${LOCALSETUP}" = "yes" ]; then - CVSMSG=$(mktemp /tmp/archmsg.XXXX) - rm ${CVSMSG} - mkdir -p ${CVSMSG} - # checkout actual name from cvs rc.sysinit - export CVSROOT=${ARCH_CVSSETUP} - cd ${CVSMSG} - cvs -z3 co -r ${TAG} arch/build/base/initscripts/rc.sysinit - NAME=$(grep 'Arch' arch/build/base/initscripts/rc.sysinit | sed -e 's/printhl "//g' -e 's/$C_OTHER(${C_H2}//g' -e 's/\\n"//g' -e 's/$C_OTHER)//g') - else - NAME=$(grep 'Arch' ${RCSYSINIT} | sed -e 's/printhl "//g' -e 's/$C_OTHER(${C_H2}//g' -e 's/\\n"//g' -e 's/$C_OTHER)//g') - fi + NAME=${ARCHVERSION} echo "Arch Linux" >> ${BOOTMESSAGE} echo "http://www.archlinux.org" >> ${BOOTMESSAGE} echo "Copyright 2002 - 2007 Judd Vinet " >> ${BOOTMESSAGE} @@ -31,7 +20,7 @@ install () echo "Creation Tool: '$(echo ${RUNPROGRAM} | sed 's|-grub||')' written by Tobias Powalowski " >> ${BOOTMESSAGE} echo "" >> ${BOOTMESSAGE} echo "${CONFIGMSG}" >> ${BOOTMESSAGE} - echo "${NAME}" >> ${BOOTMESSAGE} + echo "Arch Linux ${NAME}" >> ${BOOTMESSAGE} echo "Kernel: ${USEKERNEL}" >> ${BOOTMESSAGE} echo "Architecture: $(uname -m)" >> ${BOOTMESSAGE} echo "Creation Date: $(date)" >> ${BOOTMESSAGE}