Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to devel grimoire by Flavien Bridault (120daaffc25b7617bd56f9eb66196596567075c7)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Flavien Bridault <scm AT mail.sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to devel grimoire by Flavien Bridault (120daaffc25b7617bd56f9eb66196596567075c7)
  • Date: Sat, 26 Aug 2006 05:17:31 -0500

GIT changes to devel grimoire by Flavien Bridault <vlaaad AT sourcemage.org>:

disk/udev/BUILD | 16 ++--
disk/udev/CONFIGURE | 25 ++++---
disk/udev/DEPENDS | 3
disk/udev/DETAILS | 11 ++-
disk/udev/FINAL | 5 -
disk/udev/HISTORY | 133
++++++++++++++++++++++++++++++++++++++
disk/udev/INSTALL | 77 ++++++++++++++--------
disk/udev/Makefile.patch | 8 +-
disk/udev/PREPARE | 27 ++++---
disk/udev/PRE_BUILD | 19 +++--
disk/udev/WIP | 4 +
disk/udev/helpers/mac2name | 12 ++-
disk/udev/init.d/coldplug | 9 ++
disk/udev/rules/07-bindings.rules | 2
disk/udev/rules/README | 4 -
disk/udev/rules/rules.examples | 30 ++++----
16 files changed, 286 insertions(+), 99 deletions(-)

New commits:
commit 120daaffc25b7617bd56f9eb66196596567075c7
Author: Flavien Bridault <vlaaad AT sourcemage.org>
Commit: Flavien Bridault <vlaaad AT sourcemage.org>

udev: updated to 098, problems remain, see WIP

commit 3d2241cd112ce1869f4f23bf25e5a152ad7b82cf
Author: Flavien Bridault <vlaaad AT sourcemage.org>
Commit: Flavien Bridault <vlaaad AT sourcemage.org>

udev: sync the spell from master

diff --git a/disk/udev/BUILD b/disk/udev/BUILD
index a94395a..90cbc23 100755
--- a/disk/udev/BUILD
+++ b/disk/udev/BUILD
@@ -8,12 +8,12 @@ if [[ "$UDEV_EXTRAS" == 'y' ]]; then
make EXTRAS="extras/ata_id extras/dasd_id extras/edd_id extras/floppy
extras/scsi_id extras/usb_id extras/volume_id" \
prefix=${INSTALL_ROOT}/ exec_prefix=${INSTALL_ROOT}/ ${OPTS} \
${UDEV_DEBUG} DEST_DIR="./" V=true
-fi &&
-
-if [[ "$UDEV_STATIC" == 'y' ]]; then
- pushd __static__ &&
- # we are not going to use `make install' so no need to set its parameters
- message "${MESSAGE_COLOR}Building static utilities:
$UDEV_STATIC_TARGET${DEFAULT_COLOR}" &&
- make USE_STATIC=true V=true $OPTS $UDEV_STATIC_TARGET &&
- popd
fi
+
+#if [[ "$UDEV_STATIC" == 'y' ]]; then
+# pushd __static__ &&
+# # we are not going to use `make install' so no need to set its parameters
+# message "${MESSAGE_COLOR}Building static utilities:
$UDEV_STATIC_TARGET${DEFAULT_COLOR}" &&
+# make USE_STATIC=true V=true $OPTS $UDEV_STATIC_TARGET &&
+# popd
+#fi
diff --git a/disk/udev/CONFIGURE b/disk/udev/CONFIGURE
index bedddb1..e387202 100755
--- a/disk/udev/CONFIGURE
+++ b/disk/udev/CONFIGURE
@@ -1,14 +1,21 @@
config_query UDEV_PERSIST 'Install persistent storage rules?' n &&
-config_query UDEV_STATIC 'Create static binaries in addition to dynamically
linked ones?' n &&
-config_query_option UDEV_DEBUG 'Compile extra debugging messages?' n
'DEBUG=true' 'DEBUG=false' &&
-if [[ "$UDEV_STATIC" == 'y' ]]; then
- if [[ -z "$UDEV_STATIC_TARGET" ]]; then
- # add more UDEV utilities here as necessary, space-separated
- local UDEV_STATIC_TARGET="udevstart"
- fi &&
- persistent_add UDEV_STATIC_TARGET &&
- message "${MESSAGE_COLOR}Static utilities (with suffix .static):
$UDEV_STATIC_TARGET${DEFAULT_COLOR}"
+
+if [ "$RECENT_KERNEL" == "y" ]; then
+ config_query UDEV_PERSIST_INPUT 'Install persistent input rules?' n
fi &&
+
+config_query_option UDEV_DEBUG 'Compile extra debugging messages?' n
'DEBUG=true' 'DEBUG=false' &&
+
+#config_query UDEV_STATIC 'Create static binaries in addition to dynamically
linked ones?' n &&
+#if [[ "$UDEV_STATIC" == 'y' ]]; then
+# if [[ -z "$UDEV_STATIC_TARGET" ]]; then
+# # add more UDEV utilities here as necessary, space-separated
+# local UDEV_STATIC_TARGET="udevstart"
+# fi &&
+# persistent_add UDEV_STATIC_TARGET &&
+# message "${MESSAGE_COLOR}Static utilities (with suffix .static):
$UDEV_STATIC_TARGET${DEFAULT_COLOR}"
+#fi &&
+
if [[ "$UDEV_PERSIST" == "y" ]]; then
UDEV_EXTRAS=y &&
persistent_add UDEV_EXTRAS
diff --git a/disk/udev/DEPENDS b/disk/udev/DEPENDS
index 096db19..f17ed61 100755
--- a/disk/udev/DEPENDS
+++ b/disk/udev/DEPENDS
@@ -1,7 +1,8 @@
depends gnupg &&
depends smgl-fhs &&

-local KVER=`installed_version linux |cut -c-6` &&
+. $GRIMOIRE/FUNCTIONS
+local KVER=$(get_kernel_version |cut -c-6) &&

if [[ "$KVER" < "2.6.13" ]]; then
depends hotplug
diff --git a/disk/udev/DETAILS b/disk/udev/DETAILS
index de8dc1a..a215e74 100755
--- a/disk/udev/DETAILS
+++ b/disk/udev/DETAILS
@@ -1,5 +1,9 @@
SPELL=udev
- VERSION=090
+if [ "$RECENT_KERNEL" == "n" ]; then
+ VERSION=092
+else
+ VERSION=098
+fi
SOURCE=$SPELL-$VERSION.tar.bz2
SOURCE2=$SOURCE.sign
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
@@ -9,11 +13,10 @@ SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL
SOURCE_GPG="kernel.gpg:$SOURCE.sign"

WEB_SITE=http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
ENTERED=20030725
- UPDATED=20060107
- PATCHLEVEL=8
+ PATCHLEVEL=15
DOCS="ChangeLog COPYING FAQ README docs/* RELEASE-NOTES"
LICENSE[0]=GPL
- KEYWORDS="disk"
+ KEYWORDS="disk devices nodes modules"
SHORT="Udev creates and removes device nodes"
cat << EOF
Udev creates and removes device nodes in /dev, based on events the kernel
diff --git a/disk/udev/FINAL b/disk/udev/FINAL
index 9afbe88..d707d46 100755
--- a/disk/udev/FINAL
+++ b/disk/udev/FINAL
@@ -1,8 +1,3 @@
-# moving the old rules to rules.d
-if [ -f ${UDEV_CFG}/udev.rules ];then
- install_config_file ${UDEV_CFG}/udev.rules
${UDEV_CFG}/rules.d/00-local.rules &&
- rm -f ${UDEV_CFG}/udev.rules
-fi
#Ensure that all groups used in 50-default.rules exist
create_group disk
create_group cdrom
diff --git a/disk/udev/HISTORY b/disk/udev/HISTORY
index 5f93d98..d10ff01 100644
--- a/disk/udev/HISTORY
+++ b/disk/udev/HISTORY
@@ -1,3 +1,136 @@
+2006-08-23 Flavien Bridault <vlaaad AT sourcemage.org>
+ * DETAILS: Updated to 098
+ * rules/*.rules, 52-modules.rules: Some keys have been renamed,
+ BUS->SUBSYSTEMS, SYSFS->ATTRS, ID->KERNEL, DRIVER->DRIVERS, see
+ the udev RELEASE-NOTES for more informations.
+ * rules.examples: same renaming and replaced some = by == where
+ needed, examples rules should also try to be correct ;-)
+
+2006-08-15 Juuso Alasuutari <iuso AT sourcemage.org>
+ * DETAILS: [automated] Removed UPDATED (deprecated in favor of
+ PATCHLEVEL).
+
+2006-08-15 Flavien Bridault <vlaaad AT sourcemage.org>
+ * DETAILS: PATCHLEVEL++ to get the alsa rules files that was actually
+ not integrated in git repository
+
+2006-08-13 Flavien Bridault <vlaaad AT sourcemage.org>
+ * DETAILS: Updated to 097
+ * rules.d/40-alsa.rules: Added since the file disappeared from the
tarball
+ * INSTALL: Added missing &&
+ rules have moved in the tarball from etc/udev to etc/udev/rules.d
+ install late rules from the tarball
+
+2006-07-11 Flavien Bridault <vlaaad AT sourcemage.org>
+ * DETAILS: Updated to 096
+
+2006-07-05 Flavien Bridault <vlaaad AT sourcemage.org>
+ * DETAILS: Updated to 095
+ * ifrename_wait_retry.patch: removed, has been integrated in release
+ * PRE_BUILD: removed patch above
+
+2006-06-25 Juuso Alasuutari <iuso AT sourcemage.org>
+ * PRE_BUILD: Added patch to allow network interface renaming
+ with existing names. Added comments about patches, tidied
+ code.
+ * CONFIGURE, PRE_BUILD, BUILD, INSTALL: Commented out static
+ target parts, it only installs udevstart which is deprecated
+ now.
+ * ifrename_wait_retry.patch: Added.
+ * Makefile.patch: Updated.
+
+2006-06-24 Juuso Alasuutari <iuso AT sourcemage.org>
+ * helpers/mac2name: Edited to read DEVICE_MAC instead of MAC in
+ /etc/sysconfig/network/*.dev. Fixed a bug where supplying no
+ argument to the script resulted in an interface name. Edited
+ to display message on error. Made small optimizations.
+ * DETAILS: PATCHLEVEL++
+
+2006-06-21 Flavien Bridault <vlaaad AT sourcemage.org>
+ * rules/50-default.rules: removed OSS sound devices from /dev/sound
+ (bug #12662)
+ * DETAILS: PATCHLEVEL++
+
+2006-06-17 Flavien Bridault <vlaaad AT sourcemage.org>
+ * DETAILS: added 094. This one is not compatible with kernels older
+ than 2.6.15rc1 because of udevsend, so we will keep both 092 and
+ > 092 for a while, PATCHLEVEL++ to get the previous update
+ * PREPARE: Removed the warning for the config files move, this stuff
+ has been there for 14 months, added a test to use the right udev
+ version according to the kernel version
+ * CONFIGURE: Prompt for persistent input rules
+ * INSTALL: Removed udevsend and udevstart install for kernels
+ newer than 2.6.15rc1, added persistent input rules installing,
+ added firmware rule generation according to the kernel version
+ * FINAL: Removed the move of the config files
+ * rules/50-default.rules: remove the rule for the firmware, now
+ generated in INSTALL
+ * init.d/coldplug: added udevsettle launching after udevtrigger to
+ wait for udev events before the script exits
+
+2006-06-11 Juuso Alasuutari <iuso AT sourcemage.org>
+ * rules/50-default.rules: Removed deprecated %e from cdrom
+ rules, rewrote to use new helper script instead. Did some
+ reorganizing with cdrom and disk rules.
+ * helpers/cdsymlink_helper: Added.
+ * INSTALL: Added cdsymlink_helper script install.
+
+2006-05-15 Juuso Alasuutari <iuso AT sourcemage.org>
+ * PRE_BUILD: Removed fix for typo in alsa rules file, was fixed
+ upstream
+ * DEPENDS: Replaced "installed_version linux" with
+ "get_kernel_version", fixes conditional for custom kernels
+
+2006-05-15 Flavien Bridault <vlaaad AT sourcemage.org>
+ * DETAILS: Updated to 092
+
+2006-05-12 Juuso Alasuutari <iuso AT sourcemage.org>
+ * rules/50-default.rules: Fixed invalid KERNEL fields
+
+2006-05-12 Juuso Alasuutari <iuso AT sourcemage.org>
+ * rules/50-default.rules: Fixed ptmx device permission error
+ * DETAILS: PATCHLEVEL
+
+2006-05-11 Flavien Bridault <vlaaad AT sourcemage.org>
+ * INSTALL: install path_id in /lib/udev since this is a helper,
+ otherwise udev persistent disk rules don't find it
+
+2006-05-10 Juuso Alasuutari <iuso AT sourcemage.org>
+ * rules/50-default.rules: Fixed incorrect node naming for usb
+ printers, added new rules for various devices
+ * DETAILS: Updated PATCHLEVEL, added some new keywords
+
+2006-05-02 Juuso Alasuutari <iuso AT sourcemage.org>
+ * INSTALL: Install early rules straight from source dir
+ * rules/05-udev-early.rules: Deleted
+ * rules/50-default.rules: Thiefed a ton of rules from gentoo
+ rules file, fixed some typos
+ * 52-modules.rules: Some edits
+
+2006-04-30 Juuso Alasuutari <iuso AT sourcemage.org>
+ * INSTALL: Install modprobe aliases for non-hotplug systems
+
+2006-04-29 Juuso Alasuutari <iuso AT sourcemage.org>
+ * PRE_BUILD: Add fix for upstream typo in alsa rules file
+
+2006-04-28 Juuso Alasuutari <iuso AT sourcemage.org>
+ * DETAILS: Updated PATCHLEVEL
+
+2006-04-28 Juuso Alasuutari <iuso AT sourcemage.org>
+ * 50-default.rules, 50-default.rules-hotplug: Deleted, see below
+ * rules/50-default.rules: Added, now the differences between
+ non-hotplug and hotplug systems are taken care of in
+ 52-modules.rules*
+ * 52-modules.rules, 52-modules.rules-hotplug: Added, different
+ module loading rules for non-hotplug and hotplug systems. Also
+ some new rules for non-hotplug, fixes e.g. SCSI driver
+ loading.
+ * INSTALL: Edited to install correct 52-modules.rules* file
+ * rules/README: Updated the text a bit
+
+2006-04-27 Juuso Alasuutari <iuso AT sourcemage.org>
+ * DETAILS: Version 091
+
2006-04-18 Juuso Alasuutari <iuso AT sourcemage.org>
* DETAILS: Version 090
* rules/05-udev-early.rules: Added
diff --git a/disk/udev/INSTALL b/disk/udev/INSTALL
index c795fe2..d7ad786 100755
--- a/disk/udev/INSTALL
+++ b/disk/udev/INSTALL
@@ -1,53 +1,76 @@
install -d ${INSTALL_ROOT}/sys &&
-local file UDEV_CFG=${INSTALL_ROOT}/etc/udev &&
+local FILE UDEV_CFG=${INSTALL_ROOT}/etc/udev &&
+# udev <= 092 and > 092 gives a different name for the firmware helper
+local FIRMWARE_HELPER_NAME FIRMWARE_RULE &&
mkdir -p ${UDEV_CFG}/rules.d &&

install_config_file $SCRIPT_DIRECTORY/udev.conf ${UDEV_CFG}/udev.conf &&
install_config_file $SCRIPT_DIRECTORY/udev.missing ${UDEV_CFG}/udev.missing
&&

-for file in $SCRIPT_DIRECTORY/rules/* ; do
- install_config_file $file ${UDEV_CFG}/rules.d/$(basename $file)
+for FILE in $SCRIPT_DIRECTORY/rules/* ; do
+ install_config_file $FILE ${UDEV_CFG}/rules.d/$(basename $FILE)
done &&

-# install diff default rules on hotplug and non-hotplug systems
+# install diff default rules on hotplug and non-hotplug systems, install
+# required modprobe aliases for non-hotplug rules
if spell_ok hotplug; then
- install_config_file $SCRIPT_DIRECTORY/50-default.rules-hotplug
${UDEV_CFG}/rules.d/50-default.rules
+ install_config_file $SCRIPT_DIRECTORY/52-modules.rules-hotplug
${UDEV_CFG}/rules.d/52-modules.rules
else
- install_config_file $SCRIPT_DIRECTORY/50-default.rules
${UDEV_CFG}/rules.d/50-default.rules
-fi
+ install_config_file $SCRIPT_DIRECTORY/52-modules.rules
${UDEV_CFG}/rules.d/52-modules.rules &&
+ mkdir -p $INSTALL_ROOT/etc/modprobe.d &&
+ install_config_file $SCRIPT_DIRECTORY/modprobe.aliases
$INSTALL_ROOT/etc/modprobe.d/udev
+fi &&
+
+# install early rules
+install_config_file $SOURCE_DIRECTORY/etc/udev/rules.d/05-udev-early.rules \
+ ${UDEV_CFG}/rules.d/05-udev-early.rules &&

-# install alsa rules
-install_config_file etc/udev/suse/40-alsa.rules
${UDEV_CFG}/rules.d/40-alsa.rules
+# install late rules
+install_config_file $SOURCE_DIRECTORY/etc/udev/rules.d/95-udev-late.rules \
+ ${UDEV_CFG}/rules.d/95-udev-late.rules &&
+
+if [ "$RECENT_KERNEL" == "n" ]; then
+ # udevstart and udevsend are nolonger installed by default. we need them
for kernel < 2.6.15rc1
+ install udevsend udevstart ${INSTALL_ROOT}/sbin &&
+ FIRMWARE_HELPER_NAME="firmware_helper"
+else
+ FIRMWARE_HELPER_NAME="firmware.sh"
+fi &&

-# udevstart and udevsend are nolonger installed by default. we still need
them
-install udevsend udevstart ${INSTALL_ROOT}/sbin &&
+FIRMWARE_RULE="SUBSYSTEM==\"firmware\", ACTION==\"add\",
RUN+=\"/lib/udev/$FIRMWARE_HELPER_NAME\"" &&
+echo $FIRMWARE_RULE >> ${UDEV_CFG}/rules.d/50-default.rules &&

make prefix=${INSTALL_ROOT}/ exec_prefix=${INSTALL_ROOT}/ V=true ${OPTS}
install &&
make EXTRAS="extras/run_directory extras/cdrom_id extras/firmware" \
prefix=${INSTALL_ROOT}/ exec_prefix=${INSTALL_ROOT}/ \
V=true ${OPTS} install &&

-# Install interface name retriever script
-mkdir -p /lib/udev &&
-install -m 755 $SCRIPT_DIRECTORY/helpers/mac2name \
-$INSTALL_ROOT/lib/udev &&
+# Install helper scripts
+mkdir -p /lib/udev &&
+for FILE in $SCRIPT_DIRECTORY/helpers/*; do
+ install -m 755 $FILE $INSTALL_ROOT/lib/udev
+done &&

if [[ "$UDEV_EXTRAS" == 'y' ]]; then
make EXTRAS="extras/ata_id extras/dasd_id extras/edd_id extras/floppy
extras/scsi_id extras/usb_id extras/volume_id" prefix=${INSTALL_ROOT}/
exec_prefix=${INSTALL_ROOT}/ ${OPTS} V=true install &&
- install extras/path_id/path_id ${INSTALL_ROOT}/sbin &&
+ install extras/path_id/path_id ${INSTALL_ROOT}/lib/udev &&

if [[ "$UDEV_PERSIST" == 'y' ]];then
- install_config_file etc/udev/60-persistent-storage.rules
${UDEV_CFG}/rules.d/60-persistent-storage.rules
+ install_config_file etc/udev/rules.d/60-persistent-storage.rules
${UDEV_CFG}/rules.d/60-persistent-storage.rules
fi

-fi &&
-
-if [[ "$UDEV_STATIC" == 'y' ]]; then
- pushd __static__ &&
- # we are not supposed to use `make install'
- local __FILE
- for __FILE in $UDEV_STATIC_TARGET; do
- install -D $__FILE $INSTALL_ROOT/usr/sbin/$__FILE.static
- done &&
- popd
+ if [ "$RECENT_KERNEL" == "y" ]; then
+ if [[ "$UDEV_PERSIST_INPUT" == 'y' ]];then
+ install_config_file etc/udev/rules.d/60-persistent-input.rules
${UDEV_CFG}/rules.d/60-persistent-input.rules
+ fi
+ fi
fi
+
+#if [[ "$UDEV_STATIC" == 'y' ]]; then
+# pushd __static__ &&
+# # we are not supposed to use `make install'
+# for FILE in $UDEV_STATIC_TARGET; do
+# install -D $FILE $INSTALL_ROOT/usr/sbin/$FILE.static
+# done &&
+# popd
+#fi
diff --git a/disk/udev/Makefile.patch b/disk/udev/Makefile.patch
index 6807c62..77c1c5b 100644
--- a/disk/udev/Makefile.patch
+++ b/disk/udev/Makefile.patch
@@ -1,7 +1,7 @@
---- Makefile 2005-12-03 19:11:40.000000000 +0100
-+++ Makefile.new 2005-12-03 19:12:18.000000000 +0100
-@@ -340,11 +340,6 @@
- echo $$target; \
+--- Makefile 2006-06-25 15:48:49.000000000 +0300
++++ Makefile.new 2006-06-25 15:49:39.000000000 +0300
+@@ -294,11 +294,6 @@
+ @extras="$(EXTRAS)"; for target in $$extras; do \
$(MAKE) -C $$target $@ || exit 1; \
done;
-ifndef DESTDIR
diff --git a/disk/udev/PREPARE b/disk/udev/PREPARE
index bc18823..f3a3aa0 100755
--- a/disk/udev/PREPARE
+++ b/disk/udev/PREPARE
@@ -1,3 +1,6 @@
+# Source grimoire FUNCTIONS to have get_kernel_version
+. $SCRIPT_DIRECTORY/../../FUNCTIONS
+
# testing if the install_config_file function is available
# we don't want to spend time building udev if we can't install it properly

@@ -7,16 +10,18 @@ if ! grep -q install_config_file /var/l
return 1
fi
&&

-message "${MESSAGE_COLOR}"
&&
-message "This update will move your current udev.rules to
/etc/udev/rules.d/00-local.rules" &&
-message "As this is a major change, it won't happen unless\
- you answer y to the following question. ${DEFAULT_COLOR}"
&&
-
-config_query UDEV_UPDATE2 "Do you still wish to continue?" n
&&
+KERNEL_VERSION=$(get_kernel_version) &&
+PATCHLEVEL=`echo $KERNEL_VERSION | cut -d. -f2` &&
+SUBLEVEL=`echo $KERNEL_VERSION | cut -d. -f3` &&
+tmp=`echo $KERNEL_VERSION | cut -d. -f3 | sed 's/^[0-9]*//g'` &&
+SUBLEVEL=${SUBLEVEL/$tmp/} &&

-if [ "$UDEV_UPDATE2" == "n" ]; then
- return 1
+# kernel < 2.6.15-rc1 can't use udev > 0.93 tarballs because udevsend has
been removed
+if [ $SUBLEVEL -ge 15 -a $PATCHLEVEL -ge 6 ]; then
+ RECENT_KERNEL="y"
else
- message "A default udev.rules will be placed in
/etc/udev/rules.d/50-default.rules" &&
- message "And some examples in /etc/udev/rules.d/rules.examples"
-fi
+ RECENT_KERNEL="n" &&
+ message "You have a kernel < 2.6.15, it is too old for latest udev." &&
+ message "Switching to 092..."
+fi &&
+persistent_add RECENT_KERNEL
diff --git a/disk/udev/PRE_BUILD b/disk/udev/PRE_BUILD
index a74738d..5a3ef7c 100755
--- a/disk/udev/PRE_BUILD
+++ b/disk/udev/PRE_BUILD
@@ -1,9 +1,12 @@
-default_pre_build &&
-cd $SOURCE_DIRECTORY &&
-patch -p0 < $SCRIPT_DIRECTORY/Makefile.patch &&
+default_pre_build &&
+cd $SOURCE_DIRECTORY &&

-if [[ "$UDEV_STATIC" == 'y' ]]; then
- message "${MESSAGE_COLOR}Setting up static build
directory...${DEFAULT_COLOR}" &&
- mkdir __static__ &&
- cp -aRv Makefile *.{c,h} ./__static__/
-fi
+# Prevent udev restart on 'make install',
+# allow network interface renaming with existing name.
+patch -p0 < $SCRIPT_DIRECTORY/Makefile.patch
+
+#if [[ "$UDEV_STATIC" == 'y' ]]; then
+# message "${MESSAGE_COLOR}Setting up static build
directory...${DEFAULT_COLOR}" &&
+# mkdir __static__ &&
+# cp -aRv Makefile *.{c,h} ./__static__/
+#fi
diff --git a/disk/udev/WIP b/disk/udev/WIP
new file mode 100644
index 0000000..f136561
--- /dev/null
+++ b/disk/udev/WIP
@@ -0,0 +1,4 @@
+udev: updated to 098, problems remain when rebooting during coldplug I guess.
+My box indeed hangs after the last message of devices script. No modules seem
+to load. :(
+I wonder what's the problem... :-/
diff --git a/disk/udev/helpers/mac2name b/disk/udev/helpers/mac2name
index 90eb83b..9124da8 100755
--- a/disk/udev/helpers/mac2name
+++ b/disk/udev/helpers/mac2name
@@ -2,13 +2,17 @@ #!/bin/bash
# Source Mage GNU/Linux udev helper script
# Retrieve interface name for given MAC address

+[[ -z $1 ]] && builtin echo Argument required! >&2 && exit 1
+
for a in /etc/sysconfig/network/*.dev; do
- unset MAC
+ DEVICE_MAC=
. $a 2>/dev/null
- if [[ "$MAC" == "$1" ]]; then
- a=${a/%\.dev}
- builtin echo ${a/#\/etc\/sysconfig\/network\/}
+ if [[ "$DEVICE_MAC" == "$1" ]]; then
+ a=${a%\.dev}
+ builtin echo ${a#\/etc\/sysconfig\/network\/}
exit 0
fi
done
+
+builtin echo No matching device found! >&2
exit 1
diff --git a/disk/udev/init.d/coldplug b/disk/udev/init.d/coldplug
index b173432..a2442b9 100755
--- a/disk/udev/init.d/coldplug
+++ b/disk/udev/init.d/coldplug
@@ -1,6 +1,6 @@
#!/bin/bash

-PROGRAM=/sbin/udevtrigger
+PROGRAM=/bin/false
RUNLEVEL=DEV
ESSENTIAL=yes
NEEDS="devices udevd"
@@ -8,6 +8,13 @@ NEEDS="devices udevd"
# source function library
. /etc/init.d/smgl_init

+start()
+{
+ /sbin/udevtrigger
+ # Wait for udev events
+ /sbin/udevsettle
+}
+
stop() { exit 0; }
restart() { exit 3; }
reload() { exit 3; }
diff --git a/disk/udev/rules/07-bindings.rules
b/disk/udev/rules/07-bindings.rules
index 3929263..a4a03eb 100644
--- a/disk/udev/rules/07-bindings.rules
+++ b/disk/udev/rules/07-bindings.rules
@@ -1,2 +1,2 @@
# Bind MAC addresses to interface names if they are set with netconf
-KERNEL=="eth*", SYSFS{address}=="?*", PROGRAM="/lib/udev/mac2name
%s{address}", NAME="%c"
+KERNEL=="eth*", ATTRS{address}=="?*", PROGRAM="/lib/udev/mac2name
%s{address}", NAME="%c"
diff --git a/disk/udev/rules/README b/disk/udev/rules/README
index 3e5c56c..00a082a 100644
--- a/disk/udev/rules/README
+++ b/disk/udev/rules/README
@@ -6,4 +6,6 @@ an idea of what's possible with udev.
When a rule matches in one file, a different rule in another file will be
ignored, so be sure to name your own files properly.

-Be sure to leave 50-default.rules as it is, so the spell can update it when
needed.
+Be sure to leave rules files installed by the spell as they are, so the
+spell can update them when needed. If you need to make changes, always
+add your own rules files when possible.
diff --git a/disk/udev/rules/rules.examples b/disk/udev/rules/rules.examples
index c36098d..16cc41e 100644
--- a/disk/udev/rules/rules.examples
+++ b/disk/udev/rules/rules.examples
@@ -3,40 +3,40 @@ # fields. See the udev man page for a f
# These are just some examples, check the manpage for the full options

# Looking for scsi bus id 42:0:0:1
-#BUS="scsi", PROGRAM="/bin/echo -n test-%b", RESULT="test-42:0:0:1",
NAME="%c"
+#SUBSYSTEMS=="scsi", PROGRAM="/bin/echo -n test-%b", RESULT="test-42:0:0:1",
NAME="%c"

# A usb camera.
-#BUS="usb", SYSFS_vendor="FUJIFILM", SYSFS_model="M100", NAME="camera%n"
+#SUBSYSTEMS=="usb", ATTRS{vendor}=="FUJIFILM", ATTRS{model}=="M100",
NAME="camera%n"

# USB Epson printer to be called lp_epson
-#BUS="usb", SYSFS_serial="HXOLL0012202323480", NAME="lp_epson"
+#SUBSYSTEMS="usb", ATTRS{serial}="HXOLL0012202323480", NAME="lp_epson"

# USB HP printer to be called lp_hp
-#BUS="usb", SYSFS_serial="W09090207101241330", NAME="lp_hp"
+#SUBSYSTEMS="usb", ATTRS{serial}="W09090207101241330", NAME="lp_hp"

# sound card with PCI bus id 00:0b.0 to be the first sound card
-#BUS="pci", ID="00:0b.0", NAME="dsp"
+#SUBSYSTEMS=="pci", KERNELS=="00:0b.0", NAME="dsp"

# sound card with PCI bus id 00:07.1 to be the second sound card
-#BUS="pci", ID="00:07.1", NAME="dsp1"
+#SUBSYSTEMS=="pci", KERNELS=="00:07.1", NAME="dsp1"

# USB mouse plugged into the third port of the first hub to be called mouse0
-#BUS="usb", PLACE="1.3", NAME="mouse0"
+#SUBSYSTEMS=="usb", PLACE=="1.3", NAME="mouse0"

# USB tablet plugged into the third port of the second hub to be called
mouse1
-#BUS="usb", PLACE="2.3", NAME="mouse1"
-#BUS="usb", PLACE="2.4", NAME="mouse2"
+#SUBSYSTEMS=="usb", PLACE=="2.3", NAME="mouse1"
+#SUBSYSTEMS=="usb", PLACE=="2.4", NAME="mouse2"

# ttyUSB1 should always be called visor
-#KERNEL="ttyUSB1", NAME="visor"
-#KERNEL="ttyUSB0", NAME="pl2303"
+#KERNEL=="ttyUSB1", NAME="visor"
+#KERNEL=="ttyUSB0", NAME="pl2303"

# a devfs like way to name some tty devices
-#KERNEL="ttyS*", NAME="tts/%n"
-#KERNEL="tty*", NAME="vc/%n"
+#KERNEL=="ttyS*", NAME="tts/%n"
+#KERNEL=="tty*", NAME="vc/%n"

# if this is a ide cdrom, name it the default name, and create a symlink to
cdrom
-#BUS="ide", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="cdrom",
NAME="%k", SYMLINK="cdrom"
+#SUBSYSTEMS=="ide", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT=="cdrom",
NAME="%k", SYMLINK="cdrom"

# DRI devices always go into a subdirectory (as per the LSB spec)
-#KERNEL="card*", NAME="dri/card%n"
+#KERNEL=="card*", NAME="dri/card%n"




Archive powered by MHonArc 2.6.24.

Top of Page