[Glibc-bsd-commits] r1797 - in trunk/freebsd-utils: . debian
scripts/sbin
Aurelien Jarno
aurel32 at alioth.debian.org
Wed Dec 13 00:10:00 CET 2006
Author: aurel32
Date: 2006-12-13 00:09:59 +0100 (Wed, 13 Dec 2006)
New Revision: 1797
Added:
trunk/freebsd-utils/debian/freebsd-utils.init.d
trunk/freebsd-utils/debian/module-init-tools.config
trunk/freebsd-utils/debian/module-init-tools.dirs
trunk/freebsd-utils/debian/module-init-tools.postinst
trunk/freebsd-utils/debian/module-init-tools.templates
trunk/freebsd-utils/module_descriptions
trunk/freebsd-utils/scripts/sbin/snd_probe
Removed:
trunk/freebsd-utils/debian/freebsd-utils.dirs
Modified:
trunk/freebsd-utils/debian/changelog
trunk/freebsd-utils/debian/control
trunk/freebsd-utils/debian/module-init-tools.install
Log:
* Merge stuff from kfreebsd-common concerning modules into
module-init-tools.
* Merge init script from kfreebsd-common into freebsd-utils.
* Create a transitional kfreebsd-common package.
* Remove the dependency from freebsd-utils to net-tools. This
is already handled by netbase through ifupdown.
Rationale:
- kfreebsd-common was doing two different things: modules handling, setting of permission in /dev
- kfreebsd-common was starting a script from module-init-tools in its postinst
- kfreebsd-common could not have the priority required, because it depends on module-init-tools which has a lower priority
- kfreebsd-common has to have the priority required because setting of permissions in /dev must be done
- one source package is easier to add to the archive that two :)
Modified: trunk/freebsd-utils/debian/changelog
===================================================================
--- trunk/freebsd-utils/debian/changelog 2006-12-12 14:46:06 UTC (rev 1796)
+++ trunk/freebsd-utils/debian/changelog 2006-12-12 23:09:59 UTC (rev 1797)
@@ -1,3 +1,14 @@
+freebsd-utils (6.1-6) unreleased; urgency=low
+
+ * Merge stuff from kfreebsd-common concerning modules into
+ module-init-tools.
+ * Merge init script from kfreebsd-common into freebsd-utils.
+ * Create a transitional kfreebsd-common package.
+ * Remove the dependency from freebsd-utils to net-tools. This
+ is already handled by netbase through ifupdown.
+
+ -- Aurelien Jarno <aurel32 at debian.org> Tue, 12 Dec 2006 23:32:50 +0100
+
freebsd-utils (6.1-5) unreleased; urgency=low
[ Petr Salinger ]
Modified: trunk/freebsd-utils/debian/control
===================================================================
--- trunk/freebsd-utils/debian/control 2006-12-12 14:46:06 UTC (rev 1796)
+++ trunk/freebsd-utils/debian/control 2006-12-12 23:09:59 UTC (rev 1797)
@@ -16,7 +16,7 @@
Priority: required
Essential: yes
Architecture: kfreebsd-i386 kfreebsd-amd64
-Depends: ${shlibs:Depends}, freebsd-hackedutils (>= 5.2.1-31), net-tools
+Depends: ${shlibs:Depends}, freebsd-hackedutils (>= 5.2.1-31)
Replaces: freebsd-hackedutils (<= 5.2.1-30)
Description: FreeBSD utilities needed for GNU/kFreeBSD.
This package contains FreeBSD utilities needed for GNU/kFreeBSD.
@@ -24,7 +24,7 @@
Package: module-init-tools
Priority: important
Architecture: kfreebsd-i386 kfreebsd-amd64
-Depends: ${shlibs:Depends}
+Depends: ${shlibs:Depends}, debconf, kfreebsd-image
Replaces: kldutils (<< 6.0-2.really.5.4-0.6), freebsd-utils (<= 5.2.1-16), freebsd-hackedutils (<= 5.2.1-32)
Description: tools for managing kFreeBSD modules
This package contains a set of programs for loading, inserting, and
@@ -39,6 +39,15 @@
.
Once installed, this package may be safely removed.
+Package: kfreebsd-common
+Priority: extra
+Architecture: all
+Depends: module-init-tools (>= 6.1-6), freebsd-utils (>= 6.1-6)
+Description: Transitional package to module-init-tools and freebsd-utils
+ Transitional package depending on module-init-tools and freebsd-utils.
+ .
+ Once installed, this package may be safely removed.
+
Package: kbdcontrol
Architecture: kfreebsd-i386 kfreebsd-amd64
Depends: ${shlibs:Depends}, debconf
Deleted: trunk/freebsd-utils/debian/freebsd-utils.dirs
===================================================================
--- trunk/freebsd-utils/debian/freebsd-utils.dirs 2006-12-12 14:46:06 UTC (rev 1796)
+++ trunk/freebsd-utils/debian/freebsd-utils.dirs 2006-12-12 23:09:59 UTC (rev 1797)
@@ -1 +0,0 @@
-etc/modules.d
Added: trunk/freebsd-utils/debian/freebsd-utils.init.d
===================================================================
--- trunk/freebsd-utils/debian/freebsd-utils.init.d 2006-12-12 14:46:06 UTC (rev 1796)
+++ trunk/freebsd-utils/debian/freebsd-utils.init.d 2006-12-12 23:09:59 UTC (rev 1797)
@@ -0,0 +1,99 @@
+#!/bin/bash
+#
+# skeleton example file to build /etc/init.d/ scripts.
+# This file should be used to construct scripts for /etc/init.d.
+#
+# Written by Miquel van Smoorenburg <miquels at cistron.nl>.
+# Modified for Debian
+# by Ian Murdock <imurdock at gnu.ai.mit.edu>.
+#
+# Version: @(#)skeleton 1.9 26-Feb-2001 miquels at cistron.nl
+#
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+set -e
+
+case "$1" in
+ start)
+ echo -n "Setting up /dev permissions..."
+
+ # only do this during boot, to avoid messing up ttys
+ if [ "$RUNLEVEL" = "S" ] ; then
+ chown root:root /dev/*
+ fi
+
+ for i in /dev/dsp{,[0-9]} /dev/mixer{,[0-9]} /dev/audio{,ctl,[0-9]} ; do
+ if test -e $i ; then
+ chgrp audio $i
+ fi
+ done
+ for i in /dev/{,a}cd[0-9] ; do
+ if test -e $i ; then
+ chgrp cdrom $i
+ fi
+ done
+ for i in /dev/console /dev/ptyp[0-9] ; do
+ if test -e $i ; then
+ chgrp tty $i
+ fi
+ done
+ for i in /dev/fd[0-9] ; do
+ if test -e $i ; then
+ chgrp floppy $i
+ fi
+ done
+ for i in /dev/ata /dev/ad[0-9]* /dev/da[0-9]* ; do
+ if test -e $i ; then
+ chgrp disk $i
+ fi
+ done
+ for i in /dev/{,k}mem ; do
+ if test -e $i ; then
+ chgrp kmem $i
+ fi
+ done
+ for i in /dev/lpt[0-9]* ; do
+ if test -e $i ; then
+ chgrp lp $i
+ fi
+ done
+ for i in /dev/cuaa[0-9] ; do
+ if test -e $i ; then
+ chgrp dialout $i
+ fi
+ done
+
+ # setup /dev/cdrom symlink
+ if ! test -e /dev/cdrom && ! test -L /dev/cdrom ; then
+ for i in {,a}cd{0,1,2,3,4,5,6,7,8,9} ; do
+ if test -e /dev/$i ; then
+ ln -s $i /dev/cdrom
+ break
+ fi
+ done
+ fi
+
+ echo "done."
+
+ # This syctl is (suposedly) correct in kernel, but kfreebsd-loader enjoys messing with it
+ sysctl "kern.module_path=/lib/modules/`uname -r`;/boot/kernel"
+
+ if test -f /etc/mtab && ! test -h /etc/mtab ; then
+ echo "Warning: /etc/mtab is a regular file, replacing with symlink."
+ rm -f /etc/mtab
+ fi
+ ln -sf /proc/mounts /etc/mtab
+
+ ;;
+
+ stop|reload|restart|force-reload)
+ ;;
+
+ *)
+ echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
Added: trunk/freebsd-utils/debian/module-init-tools.config
===================================================================
--- trunk/freebsd-utils/debian/module-init-tools.config 2006-12-12 14:46:06 UTC (rev 1796)
+++ trunk/freebsd-utils/debian/module-init-tools.config 2006-12-12 23:09:59 UTC (rev 1797)
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+if test -e /lib/modules/`uname -r` ; then
+ module_dir="/lib/modules/`uname -r`"
+else
+ module_dir="/boot/kernel"
+fi
+
+get_module_description ()
+{
+ if line=`grep "^$1[[:space:]]" /usr/share/module-init-tools/module_descriptions` ; then
+ echo ${line} | sed -e "s/^[^[:space:]]*[[:space:]]*/ (/g" -e "s/$/)/g"
+ fi
+ return 0
+}
+
+for i in `ls ${module_dir}/*.ko | sed -e "s,.*/,,g" -e "s/\.ko$//g"` ; do
+ case $i in
+ # acpi is handler by boot loader, linux/linprocfs are always loaded
+ acpi|linux|linprocfs) ;;
+ if_*)
+ if [ "${network}" = "" ] ; then
+ network="$i`get_module_description $i`"
+ else
+ network="${network}, $i`get_module_description $i`"
+ fi
+ ;;
+ snd_*|sound|speaker)
+ if [ "${sound}" = "" ] ; then
+ sound="$i`get_module_description $i`"
+ else
+ sound="${sound}, $i`get_module_description $i`"
+ fi
+ ;;
+ *)
+ if [ "${other}" = "" ] ; then
+ other="$i`get_module_description $i`"
+ else
+ other="${other}, $i`get_module_description $i`"
+ fi
+ ;;
+ esac
+done
+
+db_subst module-init-tools/network choices "$network"
+db_input high module-init-tools/network || true
+db_go
+
+db_subst module-init-tools/sound choices "$sound"
+db_input high module-init-tools/sound || true
+db_go
+
+db_subst module-init-tools/other choices "$other"
+db_input high module-init-tools/other || true
+db_go
Added: trunk/freebsd-utils/debian/module-init-tools.dirs
===================================================================
--- trunk/freebsd-utils/debian/module-init-tools.dirs 2006-12-12 14:46:06 UTC (rev 1796)
+++ trunk/freebsd-utils/debian/module-init-tools.dirs 2006-12-12 23:09:59 UTC (rev 1797)
@@ -0,0 +1,3 @@
+etc/modules.d
+usr/sbin
+usr/share/module-init-tools
Modified: trunk/freebsd-utils/debian/module-init-tools.install
===================================================================
--- trunk/freebsd-utils/debian/module-init-tools.install 2006-12-12 14:46:06 UTC (rev 1796)
+++ trunk/freebsd-utils/debian/module-init-tools.install 2006-12-12 23:09:59 UTC (rev 1797)
@@ -3,3 +3,5 @@
build-tree/src/sbin/kldconfig/kldconfig /sbin
build-tree/src/sbin/kldstat/kldstat /bin
debian/modules /etc
+scripts/sbin/snd_probe /usr/sbin
+module_descriptions /usr/share/module-init-tools
Added: trunk/freebsd-utils/debian/module-init-tools.postinst
===================================================================
--- trunk/freebsd-utils/debian/module-init-tools.postinst 2006-12-12 14:46:06 UTC (rev 1796)
+++ trunk/freebsd-utils/debian/module-init-tools.postinst 2006-12-12 23:09:59 UTC (rev 1797)
@@ -0,0 +1,92 @@
+#! /bin/sh
+# postinst script for kfreebsd-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+get_modules ()
+ {
+ test -e /etc/modules.d/module-init-tools || return 0
+ sed -e "s/#.*//g" -e "/^\( \|\t\)*$/d" /etc/modules.d/module-init-tools \
+ | tr "\n" ":" | sed -e "s/ /:/g" -e "s/^://g" -e s/:$//g -e "s/::*/:/g"
+ }
+
+case "$1" in
+ configure)
+ # Transition from the old package
+ if [ -e /etc/modules.d/kfreebsd-config ] ; then
+ mv -f /etc/modules.d/kfreebsd-config /etc/modules.d/module-init-tools
+ fi
+
+ # Save modules that old file requested. We might need to unload them
+ old="`get_modules`"
+ cat > /etc/modules.d/module-init-tools << EOF
+# Do not edit this file! It is automaticaly generated by module-init-tools
+# Use "dpkg-reconfigure module-init-tools" instead.
+EOF
+ for i in network sound other ; do
+ db_get module-init-tools/$i
+ for j in `echo "$RET" | sed -e "s/, /|/g" | tr "|" "\n" | sed -e "s/ .*//g"` ; do
+ echo "$j" >> /etc/modules.d/module-init-tools
+ done
+ done
+ new="`get_modules`"
+
+ # Unload modules that:
+ # a) were listed to be loaded in the old list
+ # b) are not listed to be loaded in the new list
+ # c) are actualy loaded
+ # d) are not acpi
+ OLDIFS="$IFS"
+ IFS=":"
+ for i in ${old} ; do case :${new}: in
+ *:$i:*|*:acpi:*)
+ ;;
+ *)
+ if kldstat -n $i >/dev/null 2>/dev/null ; then
+ echo "Unloading $i ..."
+ if ! kldunload $i ; then
+ # It could well be that the module is in use.
+ echo "Warning: failed to unload stale module $i, you may want to try manualy."
+ fi
+ else
+ echo "Not unloading $i (not loaded)"
+ fi
+ ;;
+ esac ; done
+ IFS="$OLDIFS"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
Added: trunk/freebsd-utils/debian/module-init-tools.templates
===================================================================
--- trunk/freebsd-utils/debian/module-init-tools.templates 2006-12-12 14:46:06 UTC (rev 1796)
+++ trunk/freebsd-utils/debian/module-init-tools.templates 2006-12-12 23:09:59 UTC (rev 1797)
@@ -0,0 +1,31 @@
+Template: module-init-tools/network
+Type: multiselect
+Choices: ${choices}
+Description: Select your network card drivers
+ Select the appropiate driver for your network cards. You may select more than
+ one driver, or none at all, depending on the number of cards you have.
+ .
+ Note: You most likely don't need any, since default kernels currently include
+ builtin support for many NICs. You can always come back to this question later
+ with "dpkg-reconfigure module-init-tools".
+
+Template: module-init-tools/sound
+Type: multiselect
+Choices: ${choices}
+Description: Select your sound card drivers
+ Select the appropiate driver for your sound cards. You may select more than
+ one driver, or none at all, depending on the number of cards you have.
+ .
+ Note: If you don't know, don't select any yet. Later, you can use the
+ snd_probe command to find it out. You can always come back to this question
+ with "dpkg-reconfigure module-init-tools".
+
+Template: module-init-tools/other
+Type: multiselect
+Choices: ${choices}
+Description: Select other modules
+ Below is a selection of modules that don't fall in either of the previous
+ cathegories. Select those you find adequate.
+ .
+ Note: If you don't know, don't select any yet. You can always come back to
+ this question with "dpkg-reconfigure module-init-tools".
Added: trunk/freebsd-utils/module_descriptions
===================================================================
--- trunk/freebsd-utils/module_descriptions 2006-12-12 14:46:06 UTC (rev 1796)
+++ trunk/freebsd-utils/module_descriptions 2006-12-12 23:09:59 UTC (rev 1797)
@@ -0,0 +1,74 @@
+if_an Aironet 4500/4800 802.11 wireless NICs
+if_ar Digi SYNC/570i
+if_aue ADMtek USB ethernet
+if_awi AMD PCnetMobile IEEE 802.11 wireless NICs
+if_axe ASIX Electronics AX88172 USB ethernet
+if_bfe Broadcom BCM440x 10/100 Ethernet
+if_bge Broadcom BCM570x PCI gigabit ethernet
+if_cm SMC (90c26/90c56/90c66)
+if_cue CATC USB ethernet
+if_dc DEC/Intel 21143 and various workalikes
+if_de DEC DC21x4x ethernet
+if_disc Discard device
+if_ed National Semiconductor DS8390/WD83C690 ethernet
+if_ef pseudo-device providing support for multiple ethernet frame types
+if_el 3Com Etherlink 3C501
+if_em Intel(R) PRO/1000 gigabit ethernet
+if_en Midway-based ATM interfaces
+if_ep 3Com Etherlink III (3c5x9)
+if_ex Intel EtherExpress Pro/10 ethernet
+if_faith IPv6-to-IPv4 TCP relay capturing interface
+if_fe Fujitsu MB86960A/MB86965A based Ethernet adapters
+if_fwe Ethernet over FireWire (non-standard!)
+if_fxp Intel EtherExpress PRO/100B (82557/82558)
+if_gif generic tunnel interface
+if_gre encapsulating network device
+if_gx Intel Pro/1000 gigabit ethernet
+if_ie Intel 82586
+if_kue Kawasaki LSI USB ethernet
+if_lge Level 1 LXT1001 NetCellerator PCI gigabit ethernet
+if_lnc AMD Lance/PCnet Ethernet
+if_my Myson PCI fast ethernet
+if_nge National Semiconductor PCI gigabit ethernet
+if_pcn AMD PCnet PCI
+if_ppp Kernel ppp
+if_ray Raytheon Raylink/Webgear Aviator PCCard
+if_re RealTek 8139C+/8169/8169S/8110S
+if_rl RealTek 8129/8139
+if_rue RealTek RTL8150 USB Ethernet
+if_sbni Granch SBNI12 leased line adapters
+if_sf Adaptec Duralink PCI (AIC-6915 "starfire")
+if_sis Silicon Integrated Systems SiS 900/7016
+if_sk SysKonnect SK-984x series PCI gigabit ethernet
+if_sl SLIP
+if_sn SMC 91Cxx
+if_sr synchronous RISCom/N2 / WANic 400/405
+if_ste Sundance Technologies ST201 fast ethernet
+if_stf 6to4 tunnel interface
+if_tap Ethernet tunnel software network interface
+if_ti Alteon Networks Tigon 1 and Tigon 2
+if_tl Texas Instruments TNETE100 ("ThunderLAN")
+if_tun Tunnel driver (user process ppp)
+if_tx SMC 83c17x fast ethernet
+if_txp 3Com 3XP Typhoon/Sidewinder (3CR990)
+if_vge VIA VT612x gigabit ethernet
+if_vlan IEEE 802.1Q VLAN network interface
+if_vr VIA Rhine I and Rhine II
+if_vx 3Com 3C590 family
+if_wb Winbond W89C840F
+if_wi WaveLAN/IEEE 802.11 wireless NICs
+if_xe Xircom CreditCard PCMCIA
+if_xl 3Com Etherlink XL (3c900/3c905/3c905B)
+lpt Printer
+plip TCP/IP over parallel
+snd_driver All sound drivers
+snd_emu10k1 Creative Sound Blaster Live
+snd_ich Intel ICH / Silicon Integrated Systems SiS
+snd_sbc Creative Sound Blaster ISA and compatible
+sound Digital sound subsystem
+speaker AT speaker module
+ulpt USB Printer
+umodem Modems
+urio Diamond Rio 500 audio player
+uscanner USB Scanners
+wlan 802.11 support
Added: trunk/freebsd-utils/scripts/sbin/snd_probe
===================================================================
--- trunk/freebsd-utils/scripts/sbin/snd_probe 2006-12-12 14:46:06 UTC (rev 1796)
+++ trunk/freebsd-utils/scripts/sbin/snd_probe 2006-12-12 23:09:59 UTC (rev 1797)
@@ -0,0 +1,31 @@
+#!/bin/sh
+set -e
+
+kernel="/lib/modules/`uname -r`"
+
+echo -n "Probing sound devices..."
+cd $kernel && ls snd_*.ko | sed -e "s/\.ko$//g" | grep -v "snd_driver" | (while read i ; do
+ if ! kldstat -n $i >/dev/null 2>/dev/null ; then
+ did_we_load_it="true"
+ kldload $i
+ else
+ did_we_load_it="false"
+ fi
+
+ found_name="`grep \"^pcm[0-9]*: .* kld snd_[^ ]* \" /dev/sndstat | sed -e \"s/.* \(snd_[^ ]*\) .*/\1/g\"`"
+ if [ "$found_name" = "$i" ] ; then
+ found_bool="true"
+ else
+ found_bool="false"
+ fi
+
+ if `$did_we_load_it` ; then
+ if ! kldunload $i ; then
+ echo "warning: failed to unload $i"
+ fi
+ fi
+
+ if `$found_bool` ; then
+ found_list="$found_list $found_name"
+ fi
+done ; echo " ${found_list}")
Property changes on: trunk/freebsd-utils/scripts/sbin/snd_probe
___________________________________________________________________
Name: svn:executable
+ *
More information about the Glibc-bsd-commits
mailing list