WEB_SITE=http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
ENTERED=20030725
+ UPDATED=20060107
+ PATCHLEVEL=7
DOCS="ChangeLog COPYING FAQ README docs/* RELEASE-NOTES"
LICENSE[0]=GPL
- 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 00a1e53..9afbe88 100755
--- a/disk/udev/FINAL
+++ b/disk/udev/FINAL
@@ -1,3 +1,8 @@
+# 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
@@ -7,12 +12,16 @@ create_group video
create_group audio
# warn of coming changes
-message ""
-message "${PROBLEM_COLOR}About persistent net interfaces naming:"
-message ""
-message "${MESSAGE_COLOR}The spell now uses udev rules generator. Next time
you boot, udev will generate"
-message "a rules file called /etc/udev/rules.d/70-persistent-net.rules for
all the"
-message "interfaces it has detected. Then you can modify the name of the
interface by"
-message "changing the NAME key. Udev will not erase it."
-message "The old configuration stuff with the DEVICE_MAC field in netconf is
now obsolete."
-message "${DEFAULT_COLOR}"
+cat << EOF
+MODALIAS and \$modalias are not needed and will be removed from one of
+the next udev versions, replace it in all rules with ENV{MODALIAS} or
+the sysfs "modalias" value.
+
+RUN="/bin/program" not longer automatically adds the subsystem
+as the first parameter. This is from the days of /sbin/hotplug
+which is dead now and it's just confusing to need to add a space at
+the end of the program name to prevent this.
+If you use rules that need the subsystem as the first parameter,
+like the old "udev_run_hotlugd" and "udev_run_devd", add the subsystem
+to the key like RUN+="/bin/program $env{SUBSYSTEM}".
+EOF
diff --git a/disk/udev/HISTORY b/disk/udev/HISTORY
index 81524c7..0b9f4f9 100644
--- a/disk/udev/HISTORY
+++ b/disk/udev/HISTORY
@@ -1,236 +1,3 @@
-2006-10-21 Flavien Bridault <vlaaad AT sourcemage.org>
- * DETAILS: Updated to 103
-
-2006-10-11 Flavien Bridault <vlaaad AT sourcemage.org>
- * DETAILS: Updated to 102
-
-2006-10-01 Flavien Bridault <vlaaad AT sourcemage.org>
- * DETAILS: updated to 101
- * DEPENDS: removed hotplug for old kernels since they are no longer
- supported in this spell
- * INSTALL: no longer installs custom helpers, use new udev rules
- generator, removed hotplug test for dedicated rules
- * BUILD: build rules generator
- * rules/70-cdrom_symlinks_and_perms.rules: removed
- * rules/70-cdrom_perms: added
- * helpers/{mac2name,cdrom_symlink_helper}: removed
- * rules/07-bindings.rules: removed
- * 52-modules.rules: moved in /rules directory
- * FINAL: removed old warns, added one about net interfaces naming
-
-2006-09-23 Flavien Bridault <vlaaad AT sourcemage.org>
- * DETAILS: Removed 092
- * 50-default.rules: moved back firmware.sh there
- * PREPARE: Removed old version handling, prevent to cast udev
- if the kernel version is not recent enough
- * CONFIGURE, INSTALL: Removed old version handling
- * BUILD: Split a too long line
- * CONFLICTS: conflicts with new udev-old spell
-
-2006-09-10 Flavien Bridault <vlaaad AT sourcemage.org>
- * DETAILS: Updated to 100
- * 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.
- * 50-default.rules: Removed cdrom_id related rules, a dedicated rules
- file is now installed by default, replaced cdrw group by burning
group,
- as this is the name we employ for that, removed missing usb group,
- replaced scsi by disk group
- moved symlinks and perms rules for cdrom so that they are processed
- after the new file 60-cdrom_id.rules
- * 70-cdrom_symlinks_and_perms.rules: created
- * rules.examples: same renaming and replaced some = by == where
- needed, examples rules should also try to be correct ;-)
- * init.d/udevd: actually needs devices, caused troubles on boot
- * init.d/coldplug: only needs udevd since udevd now needs devices
-
-2006-09-05 Flavien Bridault <vlaaad AT sourcemage.org>
- * INSTALL: handle rules files install for 092 (bug #13073)
-
-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
-
-2006-04-18 Juuso Alasuutari <iuso AT sourcemage.org>
- * CONFIGURE, INSTALL: Undid previous hack in favor of a better
- one. Now interface names are bound if MAC addresses are set
- for them with netconf. Thanks to Mads Laursen for the idea and
- Arwed von Merkatz for pointing out how to do it.
- * bindings: Deleted
- * helpers/mac2name: Added, helper script to retrieve interface
- names in exchange for MAC addresses
- * rules/07-bindings.rules: Added, calls mentioned script
-
-2006-04-15 Juuso Alasuutari <iuso AT sourcemage.org>
- * CONFIGURE: Added prompt to install persistent network
- interface names, made prompts more uniform
- * INSTALL: Edited to source a script to install persistent
- network interface name rules
- * bindings: Added, this is the mentioned script
-
-2006-04-06 Flavien Bridault <vlaaad AT sourcemage.org>
- * 50-default.rules-hotplug, 50-default.rules: added a rule for svgalib
- devices (bug #10858)
-
-2006-04-04 Flavien Bridault <vlaaad AT sourcemage.org>
- * 50-default.rules-hotplug, 50-default.rules: corrected path to
cdrom_id
-
-2006-04-04 Juuso Alasuutari <iuso AT sourcemage.org>
- * INSTALL: made loop vars local
-
-2006-04-04 Juuso Alasuutari <iuso AT sourcemage.org>
- * INSTALL: edited to install different default rules for hotplug
- and non-hotplug systems because rulesets are incompatible.
- removed one unused var, made another var local, and did some
- minor and not so minor fixes.
- * rules/50-default.rules: deleted
- * 50-default.rules-hotplug: added (same file as above, moved &
- renamed)
- * 50-default.rules: added (new udev-only module autoload rules
- file)
- * TRIGGERS: hotplug cast/dispel now triggers udev cast to keep
- rules up to date
- * DETAILS: PATCHLEVEL up
- * DEPENDS: made 1 var local
- * CONFIGURE: made 1 var local
- * PRE_BUILD: removed a sedit that fixes something already fixed
- upstream
-
-2006-04-03 David Brown <dmlb2000 AT gmail.com>
- * DETAILS: updated 089
- * init.d/coldplug: all you need is the udevtrigger instead of big
script
-
-2006-03-12 Karsten Behrmann <BearPerson AT sourcemage.org>
- * DETAILS: (automated) Add KEYWORDS
-
-2006-02-27 Treeve Jelbert <treeve01 AT pi.be>
- * DETAILS: version 086
-
2006-02-16 Treeve Jelbert <treeve01 AT pi.be>
* DETAILS: version 085
-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 required modprobe aliases for non-hotplug rules
-mkdir -p $INSTALL_ROOT/etc/modprobe.d &&
-install_config_file $SCRIPT_DIRECTORY/modprobe.aliases
$INSTALL_ROOT/etc/modprobe.d/udev
+# install some of the suse rules
+for file in etc/udev/suse/40-alsa.rules ; do
+ install_config_file $file ${UDEV_CFG}/rules.d/$(basename $file)
+done &&
-# 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 late rules
-install_config_file $SOURCE_DIRECTORY/etc/udev/rules.d/95-udev-late.rules \
- ${UDEV_CFG}/rules.d/95-udev-late.rules
+# udevstart and udevsend are nolonger installed by default. we still need
them
+install udevsend udevstart ${INSTALL_ROOT}/sbin &&
make prefix=${INSTALL_ROOT}/ exec_prefix=${INSTALL_ROOT}/ V=true ${OPTS}
install &&
-make EXTRAS="extras/run_directory extras/cdrom_id extras/firmware
extras/rule_generator" \
+make EXTRAS="extras/run_directory extras/cdrom_id extras/firmware" \
prefix=${INSTALL_ROOT}/ exec_prefix=${INSTALL_ROOT}/ \
V=true ${OPTS} install &&
-
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}/lib/udev &&
-
- if [[ "$UDEV_PERSIST" == 'y' ]]; then
- install_config_file etc/udev/rules.d/60-persistent-storage.rules
${UDEV_CFG}/rules.d/60-persistent-storage.rules
- fi &&
-
- 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
+ install extras/path_id ${INSTALL_ROOT}/sbin &&
+
+ if [[ "$UDEV_PERSIST" == 'y' ]];then
+ for file in etc/udev/persistent-disk.rules ; do
+ install_config_file $file ${UDEV_CFG}/rules.d/60-$(basename $file)
+ done
+ 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
-
-#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 77c1c5b..6807c62 100644
--- a/disk/udev/Makefile.patch
+++ b/disk/udev/Makefile.patch
@@ -1,7 +1,7 @@
---- 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 \
+--- 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; \
$(MAKE) -C $$target $@ || exit 1; \
done;
-ifndef DESTDIR
diff --git a/disk/udev/PREPARE b/disk/udev/PREPARE
index e5e0a8a..bc18823 100755
--- a/disk/udev/PREPARE
+++ b/disk/udev/PREPARE
@@ -1,6 +1,3 @@
-# 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
@@ -8,17 +5,18 @@ if ! grep -q install_config_file /var/l
message "${PROBLEM_COLOR}You don't have the latest stable Sorcery. Run
\`sorcery update\`${DEFAULT_COLOR}" &&
return 1
-fi
+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}"
&&
-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/} &&
+config_query UDEV_UPDATE2 "Do you still wish to continue?" n
&&
-# kernel < 2.6.15-rc1 can't use udev > 0.93 tarballs because udevsend has
been removed
-if [ $SUBLEVEL -lt 15 -o $PATCHLEVEL -lt 6 ]; then
- message "${PROBLEM_COLOR}You have a kernel < 2.6.15, it is too old for
latest udev." &&
- message "Please use udev-old spell instead..." &&
- return 1
+if [ "$UDEV_UPDATE2" == "n" ]; then
+ return 1
+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
diff --git a/disk/udev/PRE_BUILD b/disk/udev/PRE_BUILD
index 5a3ef7c..d9b5b03 100755
--- a/disk/udev/PRE_BUILD
+++ b/disk/udev/PRE_BUILD
@@ -1,12 +1,11 @@
-default_pre_build &&
-cd $SOURCE_DIRECTORY &&
+default_pre_build &&
+cd $SOURCE_DIRECTORY &&
+patch -p0 < $SCRIPT_DIRECTORY/Makefile.patch &&
# device mapper creates its own device nodes so ignore these
-KERNEL=="dm-[0-9]*", OPTIONS="ignore_device"
+#KERNEL=="dm-[0-9]*", NAME=""
KERNEL=="device-mapper", NAME="mapper/control"
# v4l devices
-KERNEL=="video[0-9]*", NAME="v4l/video%n", SYMLINK="video%n",
GROUP="video", MODE="0660"
-KERNEL=="radio[0-9]*", NAME="v4l/radio%n", GROUP="video", MODE="0660"
-KERNEL=="vbi[0-9]*", NAME="v4l/vbi%n", SYMLINK="vbi%n", GROUP="video",
MODE="0660"
-KERNEL=="vtx[0-9]*", NAME="v4l/vtx%n", GROUP="video", MODE="0660"
-
-# video devices
-KERNEL=="card*", NAME="dri/card%n", MODE="0660", GROUP="video"
-KERNEL=="3dfx*", NAME="%k", MODE="0660", GROUP="video"
-KERNEL=="nvidia*", NAME="%k", MODE="0660", GROUP="video"
-KERNEL=="fb[0-9]", NAME="%k", MODE="0660", GROUP="video"
-KERNEL=="svga[0-9]", NAME="%k", MODE="0660", GROUP="video"
-
-# network devices
-KERNEL=="tun", NAME="net/%k"
-KERNEL=="ippp*", NAME="net/%k", SYMLINK="%k", MODE="0644"
-KERNEL=="ipstate*", NAME="net/%k", SYMLINK="%k", MODE="0660"
-KERNEL=="spx", NAME="net/%k", SYMLINK="%k", MODE="0644"
-
-# diskonkey devices
-KERNEL=="diskonkey*", NAME="%k", GROUP="disk"
-
-# rem_ide devices
-KERNEL=="microdrive*", NAME="%k", GROUP="disk"
-
-# kbd devices
-KERNEL=="kbd", NAME="%k", MODE="0664"
-
-# Sony Vaio Jogdial sonypi device
-KERNEL=="sonypi", NAME="%k", MODE="0666"
-
-# packet devices
-KERNEL=="pktcdvd", NAME="pktcdvd/control", GROUP="burning", MODE="0660"
-KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/pktcdvd%n", GROUP="burning",
MODE="0660"
-
-# infiniband devices
-KERNEL=="umad*", NAME="infiniband/%k"
-KERNEL=="issm*", NAME="infiniband/%k"
-
-# Load firmwares
-SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware.sh"
+KERNEL=="video[0-9]*", NAME="v4l/video%n", SYMLINK="video%n",
GROUP="video", MODE="0660"
+KERNEL=="radio[0-9]*", NAME="v4l/radio%n", GROUP="video", MODE="0660"
+KERNEL=="vbi[0-9]*", NAME="v4l/vbi%n", SYMLINK="vbi%n", GROUP="video",
MODE="0660"
+KERNEL=="vtx[0-9]*", NAME="v4l/vtx%n", GROUP="video", MODE="0660"
+
+#nvidia devices
+KERNEL=="nvidia*" NAME="%k", MODE="0660", GROUP="video"
+
+#framebuffer devices
+KERNEL=="fb[0-9]", NAME="%k", MODE="0660", GROUP="video"
+
+# Network devices
+KERNEL=="tun", NAME="net/%k"
+
+SUBSYSTEM=="firmware", ACTION="add", RUN+="/lib/udev/firmware_helper"
+
+# be backward compatible for a while with the /etc/hotplug.d/ system
+# run /etc/hotplug.d/ stuff only if we came from a hotplug event, not for
udevstart
+ENV{UDEVD_EVENT}=="1", RUN="udev_run_hotplugd $env{SUBSYSTEM}"
diff --git a/disk/udev/rules/52-modules.rules
b/disk/udev/rules/52-modules.rules
deleted file mode 100644
index fac6f9c..0000000
--- a/disk/udev/rules/52-modules.rules
+++ /dev/null
@@ -1,35 +0,0 @@
-# Module loading rules for systems without hotplug
-
-# Autoload modules that lack aliases but have them defined in
-# /etc/modprobe.conf
-ENV{MODALIAS}!="?*", SUBSYSTEM=="pnp", RUN+="/bin/sh -c 'while read id; do
/sbin/modprobe pnp:d$$id; done < /sys$devpath/id'"
-
-# Check whether we need these rules for this event
-ACTION!="add", GOTO="modprobe_end"
-
-# Autoload modules with aliases
-ATTRS{modalias}=="?*", ACTION=="add", RUN+="/sbin/modprobe $env{MODALIAS}"
-
-# PCMCIA
-SUBSYSTEM=="pcmcia_socket", RUN+="/sbin/modprobe pcmcia"
-
-# I2O
-SUBSYSTEM!="i2o", GOTO="i2o_end"
-RUN+="/sbin/modprobe i2o-block"
-LABEL="i2o_end"
-
-# MMC
-SUBSYSTEM!="mmc", GOTO="mmc_end"
-RUN+="/sbin/modprobe mmc-block"
-LABEL="mmc_end"
-
-# SCSI
-SUBSYSTEM!="scsi_device", GOTO="scsi_device_end"
-ATTRS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
-ATTRS{type}=="1", ATTRS{vendor}=="Onstream", ATTRS{model}!="ADR*"
RUN+="/sbin/modprobe osst"
-ATTRS{type}=="1", RUN+="/sbin/modprobe st"
-ATTRS{type}=="[345]", RUN+="/sbin/modprobe sr_mod"
-RUN+="/sbin/modprobe sg"
-LABEL="scsi_device_end"
-
-LABEL="modprobe_end"
diff --git a/disk/udev/rules/70-cdrom_perms.rules
b/disk/udev/rules/70-cdrom_perms.rules
deleted file mode 100644
index a0409a5..0000000
--- a/disk/udev/rules/70-cdrom_perms.rules
+++ /dev/null
@@ -1,3 +0,0 @@
-# cdrom device symlinks and permissions
-ENV{ID_CDROM}=="?*", GROUP="cdrom"
-ENV{ID_CDROM_CD_R}=="?*", MODE="0660", GROUP="burning"
diff --git a/disk/udev/rules/README b/disk/udev/rules/README
index 00a082a..3e5c56c 100644
--- a/disk/udev/rules/README
+++ b/disk/udev/rules/README
@@ -6,6 +6,4 @@ 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 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.
+Be sure to leave 50-default.rules as it is, so the spell can update it when
needed.
diff --git a/disk/udev/rules/rules.examples b/disk/udev/rules/rules.examples
index 16cc41e..c36098d 100644
--- a/disk/udev/rules/rules.examples
+++ b/disk/udev/rules/rules.examples
@@ -3,40 +3,40 @@
# These are just some examples, check the manpage for the full options
# Looking for scsi bus id 42:0:0:1
-#SUBSYSTEMS=="scsi", PROGRAM="/bin/echo -n test-%b", RESULT="test-42:0:0:1",
NAME="%c"
+#BUS="scsi", PROGRAM="/bin/echo -n test-%b", RESULT="test-42:0:0:1",
NAME="%c"
# A usb camera.
-#SUBSYSTEMS=="usb", ATTRS{vendor}=="FUJIFILM", ATTRS{model}=="M100",
NAME="camera%n"
+#BUS="usb", SYSFS_vendor="FUJIFILM", SYSFS_model="M100", NAME="camera%n"
# USB Epson printer to be called lp_epson
-#SUBSYSTEMS="usb", ATTRS{serial}="HXOLL0012202323480", NAME="lp_epson"
+#BUS="usb", SYSFS_serial="HXOLL0012202323480", NAME="lp_epson"
# USB HP printer to be called lp_hp
-#SUBSYSTEMS="usb", ATTRS{serial}="W09090207101241330", NAME="lp_hp"
+#BUS="usb", SYSFS_serial="W09090207101241330", NAME="lp_hp"
# sound card with PCI bus id 00:0b.0 to be the first sound card
-#SUBSYSTEMS=="pci", KERNELS=="00:0b.0", NAME="dsp"
+#BUS="pci", ID="00:0b.0", NAME="dsp"
# sound card with PCI bus id 00:07.1 to be the second sound card
-#SUBSYSTEMS=="pci", KERNELS=="00:07.1", NAME="dsp1"
+#BUS="pci", ID="00:07.1", NAME="dsp1"
# USB mouse plugged into the third port of the first hub to be called mouse0
-#SUBSYSTEMS=="usb", PLACE=="1.3", NAME="mouse0"
+#BUS="usb", PLACE="1.3", NAME="mouse0"
# USB tablet plugged into the third port of the second hub to be called
mouse1
-#SUBSYSTEMS=="usb", PLACE=="2.3", NAME="mouse1"
-#SUBSYSTEMS=="usb", PLACE=="2.4", NAME="mouse2"
+#BUS="usb", PLACE="2.3", NAME="mouse1"
+#BUS="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
-#SUBSYSTEMS=="ide", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT=="cdrom",
NAME="%k", SYMLINK="cdrom"
+#BUS="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"
diff --git a/smgl/init.d/DEPENDS b/smgl/init.d/DEPENDS
index c51feb4..fd2a070 100755
--- a/smgl/init.d/DEPENDS
+++ b/smgl/init.d/DEPENDS
@@ -3,18 +3,5 @@ if [ "$DEVICES" == "devfs" ]; then
optional_depends devfsd "" "" \
"to make devfs more functional and compatible with the old static /dev"
elif [ "$DEVICES" == "udev" ]; then
- 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/} &&
-
- # 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
- depends udev
- else
- message "You have a kernel < 2.6.15, it is too old for latest udev." &&
- message "We will use udev-old spell instead..." &&
- depends udev-old
- fi
+ depends udev
fi
diff --git a/smgl/init.d/HISTORY b/smgl/init.d/HISTORY
index c919881..39f0a63 100644
--- a/smgl/init.d/HISTORY
+++ b/smgl/init.d/HISTORY
@@ -22,11 +22,6 @@
2006-10-26 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* INSTALL: use TRACK_ROOT when linking #9163
-2006-09-23 Flavien Bridault <vlaaad AT sourcemage.org>
- * DEPENDS: Check which udev spell we should cast according to the
- kernel version
- * DETAILS: PATCHLEVEL++
-
2006-09-21 Juuso Alasuutari <iuso AT sourcemage.org>
* DETAILS: [automated] Removed BUILD_API=2.
[SM-Commit] GIT changes to stable-rc-0.6 grimoire by Jaka Kranjc (c5776d1b5f53aab1c360ac102a2506754a1f0a05),
Jaka Kranjc, 01/26/2007