summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-06-11 06:54:07 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-06-11 06:54:07 +0000
commitec29e1265d3d9d66c14fc564898220351a6c2efd (patch)
tree65767f9976481e3002fde7d513ae8fa2c11569bb
parent6b92f0bd235572c715d6956b4b41659c1423138c (diff)
downloadalpine-baselayout-ec29e1265d3d9d66c14fc564898220351a6c2efd.tar.bz2
alpine-baselayout-ec29e1265d3d9d66c14fc564898220351a6c2efd.tar.xz
remove mdev stuff that moved to busybox-initscripts
-rw-r--r--Makefile6
-rwxr-xr-xdvbdev18
-rw-r--r--ide_links23
-rw-r--r--mdev.conf100
-rw-r--r--subdir_dev47
-rwxr-xr-xusbdev62
-rw-r--r--usbdisk_link34
7 files changed, 1 insertions, 289 deletions
diff --git a/Makefile b/Makefile
index 15deb71..02e2b68 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,6 @@ ETC_FILES = TZ \
hosts \
inittab \
issue \
- mdev.conf \
nsswitch.conf \
passwd \
profile \
@@ -26,11 +25,9 @@ ETC_FILES = TZ \
CONFD_FILES = $(addprefix conf.d/, tuntap vlan)
UDHCPC_FILES =default.script
-LIB_MDEV_FILES =ide_links usbdisk_link subdir_dev usbdev dvbdev
MODPROBED_FILES =aliases blacklist i386
CRONTABS =crontab
-DISTFILES =$(ETC_FILES) $(UDHCPC_FILES) $(LIB_MDEV_FILES)\
- $(MODPROBED_FILES) Makefile
+DISTFILES =$(ETC_FILES) $(UDHCPC_FILES) $(MODPROBED_FILES) Makefile
all: $(GENERATED_FILES)
for i in $(SUBDIRS) ; do \
@@ -101,7 +98,6 @@ install: $(GENERATED_FILES)
chmod 600 $(DESTDIR)/etc/shadow
install -m 0644 $(CONFD_FILES) $(DESTDIR)/etc/conf.d
install -m 0755 $(UDHCPC_FILES) $(DESTDIR)/usr/share/udhcpc
- install -m 0755 $(LIB_MDEV_FILES) $(DESTDIR)/lib/mdev
install -m 0755 $(MODPROBED_FILES) $(DESTDIR)/etc/modprobe.d
mv $(DESTDIR)/etc/crontab $(DESTDIR)/etc/crontabs/root
ln -s /etc/crontabs $(DESTDIR)/var/spool/cron/crontabs
diff --git a/dvbdev b/dvbdev
deleted file mode 100755
index f0186c1..0000000
--- a/dvbdev
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-
-# MDEV=dvb0.demux1 -> ADAPTER=dvb0 -> N=0
-ADAPTER=${MDEV%.*}
-N=${ADAPTER#dvb}
-# MDEV=dvb0.demux1 -> DEVB_DEV=demux1
-DVB_DEV=${MDEV#*.}
-
-case "$ACTION" in
- add|"")
- mkdir -p dvb/adapter${N}
- mv ${MDEV} dvb/adapter${N}/${DVB_DEV}
- ;;
- remove)
- rm -f dvb/adapter${N}/${DVB_DEV}
- rmdir dvb/adapter${N} 2>/dev/null
- rmdir dvb/ 2>/dev/null
-esac
diff --git a/ide_links b/ide_links
deleted file mode 100644
index be0c95a..0000000
--- a/ide_links
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-[ -f /proc/ide/$MDEV/media ] || exit
-
-media=`cat /proc/ide/$MDEV/media`
-for i in $media $media[0-9]* ; do
- if [ "`readlink $i 2>/dev/null`" = $MDEV ] ; then
- LINK=$i
- break
- fi
-done
-
-# link exist, remove if necessary and exit
-if [ "$LINK" ] ; then
- [ "$ACTION" = remove ] && rm $LINK
- exit
-fi
-
-# create a link
-num=`ls $media[0-9]* 2>/dev/null | wc -l`
-ln -sf $MDEV "$media`echo $num`"
-[ -e "$media" ] || ln -sf $MDEV "$media"
-
diff --git a/mdev.conf b/mdev.conf
deleted file mode 100644
index 6ee65a2..0000000
--- a/mdev.conf
+++ /dev/null
@@ -1,100 +0,0 @@
-#
-# This is a sample mdev.conf.
-#
-
-# Devices:
-# Syntax: %s %d:%d %s
-# devices user:group mode
-
-# null does already exist; therefore ownership has to be changed with command
-null root:root 0666 @chmod 666 $MDEV
-zero root:root 0666
-grsec root:root 0660
-full root:root 0666
-
-random root:root 0666
-urandom root:root 0444
-hwrandom root:root 0660
-
-# console does already exist; therefore ownership has to be changed with command
-console root:tty 0600 @chmod 600 $MDEV && mkdir -p vc && ln -sf ../$MDEV vc/0
-fd0 root:floppy 0660
-kmem root:root 0640
-mem root:root 0640
-port root:root 0640
-ptmx root:tty 0666
-
-# ram.*
-ram([0-9]*) root:disk 0660 >rd/%1
-loop([0-9]+) root:disk 0660 >loop/
-sd[a-z].* root:disk 0660 */lib/mdev/usbdisk_link
-hd[a-z][0-9]* root:disk 0660 */lib/mdev/ide_links
-md[0-9] root:disk 0660
-
-tty root:tty 0666
-tty[0-9] root:root 0600
-tty[0-9][0-9] root:tty 0660
-ttyS[0-9]* root:uucp 0660
-pty.* root:tty 0660
-vcs[0-9]* root:tty 0660
-vcsa[0-9]* root:tty 0660
-
-
-ttyLTM[0-9] root:dialout 0660 @ln -sf $MDEV modem
-ttySHSF[0-9] root:dialout 0660 @ln -sf $MDEV modem
-slamr root:dialout 0660 @ln -sf $MDEV slamr0
-slusb root:dialout 0660 @ln -sf $MDEV slusb0
-fuse root:root 0666
-
-# dri device
-card[0-9] root:video 0660 =dri/
-
-# alsa sound devices and audio stuff
-pcm.* root:audio 0660 =snd/
-control.* root:audio 0660 =snd/
-midi.* root:audio 0660 =snd/
-seq root:audio 0660 =snd/
-timer root:audio 0660 =snd/
-
-adsp root:audio 0660 >sound/
-audio root:audio 0660 >sound/
-dsp root:audio 0660 >sound/
-mixer root:audio 0660 >sound/
-sequencer.* root:audio 0660 >sound/
-
-# misc stuff
-agpgart root:root 0660 >misc/
-psaux root:root 0660 >misc/
-rtc root:root 0664 >misc/
-
-# input stuff
-event[0-9]+ root:root 0640 =input/
-mice root:root 0640 =input/
-mouse[0-9] root:root 0640 =input/
-ts[0-9] root:root 0600 =input/
-
-# v4l stuff
-vbi[0-9] root:video 0660 >v4l/
-video[0-9] root:video 0660 >v4l/
-
-# dvb stuff
-dvb.* root:video 0660 */lib/mdev/dvbdev
-
-# load drivers for usb devices
-usbdev[0-9].[0-9] root:root 0660 */lib/mdev/usbdev
-usbdev[0-9].[0-9]_.* root:root 0660
-
-# net devices
-tun[0-9]* root:root 0600 =net/
-tap[0-9]* root:root 0600 =net/
-
-# zaptel devices
-zap(.*) root:dialout 0660 =zap/%1
-dahdi!(.*) root:dialout 0660 =dahdi/%1
-
-# raid controllers
-cciss!(.*) root:disk 0660 =cciss/%1
-ida!(.*) root:disk 0660 =ida/%1
-rd!(.*) root:disk 0660 =rd/%1
-
-sr[0-9] root:cdrom 0660 >cdrom
diff --git a/subdir_dev b/subdir_dev
deleted file mode 100644
index 1cc6b03..0000000
--- a/subdir_dev
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/sh
-
-# scripts that moves devices to the $1/ subdir.
-# usage: subdir_dev [-ln] DIR [NEW_NAME]
-# options:
-# -l create link (i.e. /dev/pcm0 -> /dev/snd/pcm0)
-# -n devicename from number (i.e. /dev/loop0 => /dev/loop/0)
-
-while getopts "ln" opt; do
- case "$opt" in
- l) link=1
- ;;
- n) dev=${MDEV%[0-9]*}
- new_name=${MDEV#${dev}}
- ;;
- esac
-done
-shift $(( $OPTIND - 1 ))
-
-if [ -n "$2" ]; then
- new_name="$2"
-fi
-
-if [ -z "$new_name" ]; then
- new_name=$MDEV
-fi
-
-case "$ACTION" in
- add|"")
- if [ ! -b "$MDEV" ] && [ ! -c "$MDEV" ]; then
- exit
- fi
- mkdir -p $1
- mv $MDEV $1/$new_name
- if [ "$link" = 1 ] ; then
- ln -snf $1/$new_name $MDEV
- fi
- ;;
- remove)
- if [ "$link" = 1 ] ; then
- rm -f $MDEV
- fi
- mv $1/$new_name $MDEV
- rmdir $1 2>/dev/null
- ;;
-esac
-
diff --git a/usbdev b/usbdev
deleted file mode 100755
index b1aff29..0000000
--- a/usbdev
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/sh
-
-# script is buggy; until patched just do exit 0
-#exit 0
-
-# add zeros to device or bus
-add_zeros () {
- case "$(echo $1 | wc -L)" in
- 1) echo "00$1" ;;
- 2) echo "0$1" ;;
- *) echo "$1"
- esac
- exit 0
-}
-
-
-# bus and device dirs in /sys
-local USB_PATH=$(echo $MDEV | sed -e 's/usbdev\([0-9]\).[0-9]/usb\1/')
-USB_PATH=$(find /sys/devices -type d -name "$USB_PATH")
-local USB_DEV_DIR=$(echo $MDEV | sed -e 's/usbdev\([0-9]\).\([0-9]\)/\1-\2/')
-
-# dir names in /dev
-local BUS=$(add_zeros $(echo $MDEV | sed -e 's/^usbdev\([0-9]\).[0-9]/\1/'))
-local USB_DEV=$(add_zeros $(echo $MDEV | sed -e 's/^usbdev[0-9].\([0-9]\)/\1/'))
-
-
-# try to load the proper driver for usb devices
-case "$ACTION" in
- add|"")
- # load usb bus driver
- for i in $USB_PATH/*/modalias ; do
- modprobe `cat $i` 2>/dev/null
- done
- # load usb device driver if existent
- if [ -d $USB_PATH/$USB_DEV_DIR ]; then
- for i in $USB_PATH/$USB_DEV_DIR/*/modalias ; do
- modprobe `cat $i` 2>/dev/null
- done
- fi
- # move usb device file
- mkdir -p bus/usb/$BUS
- mv $MDEV bus/usb/$BUS/$USB_DEV
- ;;
- remove)
- # unload device driver, if device dir is existent
- if [ -d $USB_PATH/$USB_DEV_DIR ]; then
- for i in $USB_PATH/$USB_DEV_DIR/*/modalias ; do
- modprobe -r `cat $i` 2>/dev/null
- done
- fi
- # unload usb bus driver. Does this make sense?
- # what happens, if two usb devices are plugged in
- # and one is removed?
- for i in $USB_PATH/*/modalias ; do
- modprobe -r `cat $i` 2>/dev/null
- done
- # remove device file and possible empty dirs
- rm -f bus/usb/$BUS/$USB_DEV
- rmdir bus/usb/$BUS/ 2>/dev/null
- rmdir bus/usb/ 2>/dev/null
- rmdir bus/ 2>/dev/null
-esac
diff --git a/usbdisk_link b/usbdisk_link
deleted file mode 100644
index 750242b..0000000
--- a/usbdisk_link
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-
-# NOTE: since mdev -s only provide $MDEV, don't depend on any hotplug vars.
-
-current=$(readlink usbdisk)
-
-if [ "$current" = "$MDEV" ] && [ "$ACTION" = "remove" ]; then
- rm -f usbdisk usba1
-fi
-[ -n "$current" ] && exit
-
-if [ -e /sys/block/$MDEV ]; then
- SYSDEV=$(readlink -f /sys/block/$MDEV/device)
- # if /sys device path contains '/usb[0-9]' then we assume its usb
- # also, if its an usb without partitions we require FAT
- if [ "${SYSDEV##*/usb[0-9]}" != "$SYSDEV" ]; then
- # do not create link if there is not FAT
- dd if=/dev/$MDEV bs=512 count=1 2>/dev/null | strings | grep FAT >/dev/null || exit 0
-
- ln -sf $MDEV usbdisk
- # keep this for compat. people have it in fstab
- ln -sf $MDEV usba1
- fi
-
-elif [ -e /sys/block/*/$MDEV ] ; then
- PARENT=$(dirname /sys/block/*/$MDEV)
- SYSDEV=$(readlink -f $PARENT/device)
- if [ "${SYSDEV##*/usb[0-9]}" != "$SYSDEV" ]; then
- ln -sf $MDEV usbdisk
- # keep this for compat. people have it in fstab
- ln -sf $MDEV usba1
- fi
-fi
-