Commit 4c2463ed authored by Natanael Copa's avatar Natanael Copa

core/alpine-baselayout: fixes for mdev

remove the faulty mdev-mount dependency from init.d/mdev

require vfat for /dev/usbdisk to work on disks without partitions
parent 3376f274
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=alpine-baselayout
pkgver=2.0_alpha12
pkgrel=0
pkgrel=2
pkgdesc="Alpine base dir structure and init scripts"
url=http://git.alpinelinux.org/cgit/alpine-baselayout
depends=
source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2"
source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2
mdev-usbdisk.patch
mdev-initd.patch"
license=GPL-2
build() {
cd "$srcdir"/$pkgname-$pkgver
patch -p1 < ../mdev-usbdisk.patch
patch -p1 < ../mdev-initd.patch
make
make install PREFIX= DESTDIR="$pkgdir" || return 1
}
md5sums="5549065f87374ea5c4249cba6ba85d16 alpine-baselayout-2.0_alpha12.tar.bz2"
md5sums="5549065f87374ea5c4249cba6ba85d16 alpine-baselayout-2.0_alpha12.tar.bz2
4bf6829d019d2b43dd45208c7390c91c mdev-usbdisk.patch
6d3c5789e6f02c209a6f7fbf047ea3df mdev-initd.patch"
diff --git a/init.d/mdev b/init.d/mdev
index fb9e8d5..42f6a1c 100755
--- a/init.d/mdev
+++ b/init.d/mdev
@@ -2,7 +2,7 @@
depend() {
provide dev
- need sysfs mdev-mount
+ need sysfs
before checkfs fsck
keyword novserver
}
commit 9542c009af40331e8770256148aa13075f4d8294
Author: Natanael Copa <ncopa@alpinelinux.org>
Date: Thu Jun 4 14:11:43 2009 +0000
mdev: look for FAT in device to create usbdisk link
it seems like mkfs.vfat creates MBR signature
diff --git a/mdev.conf b/mdev.conf
index 3e2339b..6ee65a2 100644
--- a/mdev.conf
+++ b/mdev.conf
@@ -27,7 +27,7 @@ ptmx root:tty 0666
# ram.*
ram([0-9]*) root:disk 0660 >rd/%1
loop([0-9]+) root:disk 0660 >loop/
-sd[a-z]1 root:disk 0660 */lib/mdev/usbdisk_link
+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
diff --git a/usbdisk_link b/usbdisk_link
index 6acaad3..750242b 100644
--- a/usbdisk_link
+++ b/usbdisk_link
@@ -14,8 +14,8 @@ if [ -e /sys/block/$MDEV ]; then
# 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 an MBR signature
- dd if=/dev/$MDEV bs=1 count=2 skip=510 2>/dev/null | hexdump | grep aa55 >/dev/null && exit 0
+ # 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
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