Commit 3276e925 authored by Natanael Copa's avatar Natanael Copa

main/busybox-initscripts: minor mdev fixes

got hints from solar
parent 6645fef3
......@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=busybox-initscripts
pkgver=2.0
pkgrel=11
pkgrel=12
pkgdesc="Init scripts for busybox daemons"
url="http://git.alpinelinux.org/cgit/aports/tree/core/busybox-initscripts"
license="GPL-2"
......@@ -55,9 +55,9 @@ b5b23dd06cea120bd8d850b54bca0b59 syslog.initd
22adbf155ffc4595206ded6daad07812 rdate.confd
77fb31a75511247bf4e3430565a276bc syslog.confd
0bb55dde32f5e119111fa4938daaef3d watchdog.confd
c3eb08c577384154fdf748f1db06f8db mdev.conf
c514213ed7e56c64c44be3285d34a297 mdev.conf
ad1556961294e4aa2abca6be52138b7c dvbdev
5c8725b4cbdeda23b00f08124a0d20bf ide_links
1acfd58dfd1cf324c90ca3a3be519510 usbdev
c422992ca5bfdfabdbba1f1532bc1358 usbdev
30b0c85956b6701caf55309a17e537f6 usbdisk_link
826d85313ca7a4a0205d63bd58b7d01f xvd_links"
......@@ -17,7 +17,10 @@ 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
#console root:tty 0600 @chmod 600 $MDEV && mkdir -p vc && ln -sf ../$MDEV vc/0
console root:tty 0600 @mkdir -pm 755 fd && cd fd && for x in 0 1 2 3 ; do ln -sf /proc/self/fd/$x $x; done
fd0 root:floppy 0660
kmem root:root 0640
mem root:root 0640
......
......@@ -15,13 +15,13 @@ add_zeros () {
# bus and device dirs in /sys
local USB_PATH=$(echo $MDEV | sed -e 's/usbdev\([0-9]\).[0-9]/usb\1/')
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/')
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/'))
BUS=$(add_zeros $(echo $MDEV | sed -e 's/^usbdev\([0-9]\).[0-9]/\1/'))
USB_DEV=$(add_zeros $(echo $MDEV | sed -e 's/^usbdev[0-9].\([0-9]\)/\1/'))
# try to load the proper driver for usb devices
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment