r1479 - branches/udev_update/packages/udev

alexander at linuxfromscratch.org alexander at linuxfromscratch.org
Sun Apr 16 20:15:06 PDT 2006


Author: alexander
Date: 2006-04-16 21:15:03 -0600 (Sun, 16 Apr 2006)
New Revision: 1479

Removed:
   branches/udev_update/packages/udev/90-cdrom.rules
   branches/udev_update/packages/udev/92-cdalias-generator.rules
   branches/udev_update/packages/udev/cdalias-generator
Modified:
   branches/udev_update/packages/udev/Makefile
Log:
Removed cdalias generator - buggy and not useful on the LiveCD. Will re-add when a fixed version enters LFS.

Deleted: branches/udev_update/packages/udev/90-cdrom.rules
===================================================================
--- branches/udev_update/packages/udev/90-cdrom.rules	2006-04-13 09:32:35 UTC (rev 1478)
+++ branches/udev_update/packages/udev/90-cdrom.rules	2006-04-17 03:15:03 UTC (rev 1479)
@@ -1,3 +0,0 @@
-BUS=="ide", KERNEL=="hd[a-z]|pcd[0-9]*", DRIVER=="ide-cdrom|pcd", IMPORT{program}="/sbin/cdrom_id --export $tempnode"
-KERNEL=="scd[0-9]*", IMPORT{program}="/sbin/cdrom_id --export $tempnode"
-ENV{ID_CDROM}=="?*", GROUP="cdrom"

Deleted: branches/udev_update/packages/udev/92-cdalias-generator.rules
===================================================================
--- branches/udev_update/packages/udev/92-cdalias-generator.rules	2006-04-13 09:32:35 UTC (rev 1478)
+++ branches/udev_update/packages/udev/92-cdalias-generator.rules	2006-04-17 03:15:03 UTC (rev 1479)
@@ -1,7 +0,0 @@
-ACTION!="add",				GOTO="cd_aliases_generator_end"
-SUBSYSTEM!="block",			GOTO="cd_aliases_generator_end"
-ENV{GENERATED}=="?*",			GOTO="cd_aliases_generator_end"
-
-ENV{ID_CDROM}=="?*", PROGRAM="cdalias-generator", SYMLINK+="%c"
-
-LABEL="cd_aliases_generator_end"

Modified: branches/udev_update/packages/udev/Makefile
===================================================================
--- branches/udev_update/packages/udev/Makefile	2006-04-13 09:32:35 UTC (rev 1478)
+++ branches/udev_update/packages/udev/Makefile	2006-04-17 03:15:03 UTC (rev 1479)
@@ -34,16 +34,14 @@
 	make DESTDIR=/ EXTRAS="`echo extras/*/`" install
 	mkdir -p /lib/firmware
 	grep -v cdrom $(SRC)/$(CONFIG1) >/etc/udev/rules.d/25-lfs.rules
-	cp ../10-wait_for_sysfs.rules /etc/udev/rules.d/
+	cp etc/udev/05-udev-early.rules /etc/udev/rules.d/
 	echo 'ACTION=="add", BUS=="pci", SYSFS{class}=="0x030000", RUN+="detect-video"' >/etc/udev/rules.d/30-video.rules
 	cp ../50-network.rules /etc/udev/rules.d/
-	cp ../90-cdrom.rules /etc/udev/rules.d/
-	cp ../92-cdalias-generator.rules /etc/udev/rules.d/
 	# Debug, remove before release
 	gcc -o bug ../bug.c
 	install -m755 bug /lib/udev
-	# End of debug
 	echo 'ACTION=="add", RUN+="bug"' >/etc/udev/rules.d/90-debug.rules
+	# End of debug
 	mkdir -p /lib/udev/devices/pts
 	ln -nsf /proc/self/fd /lib/udev/devices/fd
 	ln -nsf /proc/self/fd/0 /lib/udev/devices/stdin
@@ -51,7 +49,6 @@
 	ln -nsf /proc/self/fd/2 /lib/udev/devices/stderr
 	ln -nsf /proc/kcore /lib/udev/devices/core
 	install ../detect-video /lib/udev
-	install ../cdalias-generator /lib/udev
 	install -m644 -D docs/writing_udev_rules/index.html \
 	 /usr/share/doc/$(DIR)/index.html
 

Deleted: branches/udev_update/packages/udev/cdalias-generator
===================================================================
--- branches/udev_update/packages/udev/cdalias-generator	2006-04-13 09:32:35 UTC (rev 1478)
+++ branches/udev_update/packages/udev/cdalias-generator	2006-04-17 03:15:03 UTC (rev 1479)
@@ -1,124 +0,0 @@
-#!/bin/sh -e
-# Origin: http://marc.theaimsgroup.com/?l=linux-hotplug-devel&m=114363313617910&w=2
-
-RULES_FILE="/etc/udev/rules.d/91-cdalias.rules"
-
-##############################################################################
-lock_rules_file() {
-  RULES_LOCK="/dev/.udev/.lock-${RULES_FILE##*/}"
-
-  retry=30
-  while ! mkdir $RULES_LOCK 2> /dev/null; do
-    if [ $retry -eq 0 ]; then
-       echo "Cannot lock $RULES_FILE!" >&2
-       exit 2
-    fi
-    sleep 1
-    retry=$(($retry - 1))
-  done
-}
-
-unlock_rules_file() {
-  rmdir $RULES_LOCK || true
-}
-
-# returns true if a directory is writeable
-writeable() {
-  if ln -s check $1/.is-writeable 2> /dev/null; then
-    rm -f $1/.is-writeable
-    return 0
-  else
-    return 1
-  fi
-}
-
-choose_rules_file() {
-  [ -e "$RULES_FILE" ] || PRINT_HEADER=1
-  if writeable ${RULES_FILE%/*}; then
-    RO_RULES_FILE='/dev/null'
-  else
-    RO_RULES_FILE=$RULES_FILE
-    RULES_FILE="/dev/.udev/tmp-rules--${RULES_FILE##*/}"
-  fi
-}
-
-##############################################################################
-find_next_available() {
-  local links="$(find_all_symlinks $1)"
-
-  local basename=${links%%[0-9]*}
-  local max=-1
-  for name in $links; do
-    local num=${name#$basename}
-    [ "$num" ] || num=0
-    [ $num -gt $max ] && max=$num
-  done
-
-  max=$(($max + 1))
-  # "name0" actually is just "name"
-  [ $max -eq 0 ] && return
-  echo "$max"
-}
-
-find_all_symlinks() {
-  local linkre="$1"
-  local match="$2"
-
-  [ -e $RULES_FILE ] || return
-
-  local search='.*[[:space:],]SYMLINK+="\('"$linkre"'\)"[[:space:]]*\(,.*\|\\\|\)$'
-
-  sed -n -e "${match}s/${search}/\1/p" $RO_RULES_FILE $RULES_FILE
-}
-
-write_rule() {
-  local match="$1"
-  local link="$2"
-
-  {
-  if [ "$PRINT_HEADER" ]; then
-    PRINT_HEADER=
-    echo "# This file was automatically generated by the $0"
-    echo "# program, probably run by the cd-aliases-generator.rules rules file."
-    echo "#"
-    echo "# You can modify it, as long as you keep each rule on a single line"
-    echo "# and set the \$GENERATED variable."
-    echo ""
-  fi
-
-  echo "ACTION==\"add\", ENV{ID_CDROM}==\"?*\", $match, SYMLINK+=\"$link\", ENV{GENERATED}=\"1\""
-  } >> $RULES_FILE
-  SYMLINKS="$SYMLINKS $link"
-}
-
-##############################################################################
-if [ -z "$DEVPATH" ]; then
-  echo "Missing \$DEVPATH." >&2
-  exit 1
-fi
-if [ -z "$ID_CDROM" ]; then
-  echo "$DEVPATH is not a CD reader." >&2
-  exit 1
-fi
-
-# Prevent parallel processes from modifying the file at the same time.
-lock_rules_file
-
-# Check if the rules file is writeable.
-choose_rules_file
-
-link_num=$(find_next_available 'cdrom[0-9]*')
-
-id=${PHYSDEVPATH##*/}
-match="BUS==\"$PHYSDEVBUS\", ID==\"$id\""
-
-  write_rule "$match" "cdrom$link_num"
-[ "$ID_CDROM_CD_RW" ]  && write_rule "$match"
-[ "$ID_CDROM_DVD" ]    && write_rule "$match"
-[ "$ID_CDROM_DVD_RW" ] && write_rule "$match"
-
-unlock_rules_file
-
-echo $SYMLINKS
-
-exit 0




More information about the livecd mailing list