diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-06-04 15:08:51 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-06-04 15:08:51 +0000 |
commit | 4c2463edc44e4ce25d54d33e6b86dc78e43dc676 (patch) | |
tree | 909d48b6a4334193c8458cdc8544bc8e3a22a8ae /core | |
parent | 3376f27406a2db9f1471089dd069dd8edf67295c (diff) | |
download | aports-4c2463edc44e4ce25d54d33e6b86dc78e43dc676.tar.bz2 aports-4c2463edc44e4ce25d54d33e6b86dc78e43dc676.tar.xz |
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
Diffstat (limited to 'core')
-rw-r--r-- | core/alpine-baselayout/APKBUILD | 12 | ||||
-rw-r--r-- | core/alpine-baselayout/mdev-initd.patch | 13 | ||||
-rw-r--r-- | core/alpine-baselayout/mdev-usbdisk.patch | 36 |
3 files changed, 58 insertions, 3 deletions
diff --git a/core/alpine-baselayout/APKBUILD b/core/alpine-baselayout/APKBUILD index 808c2df3a4..6f449f190c 100644 --- a/core/alpine-baselayout/APKBUILD +++ b/core/alpine-baselayout/APKBUILD @@ -1,16 +1,22 @@ # 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/core/alpine-baselayout/mdev-initd.patch b/core/alpine-baselayout/mdev-initd.patch new file mode 100644 index 0000000000..2af8497648 --- /dev/null +++ b/core/alpine-baselayout/mdev-initd.patch @@ -0,0 +1,13 @@ +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 + } diff --git a/core/alpine-baselayout/mdev-usbdisk.patch b/core/alpine-baselayout/mdev-usbdisk.patch new file mode 100644 index 0000000000..cfa0331fab --- /dev/null +++ b/core/alpine-baselayout/mdev-usbdisk.patch @@ -0,0 +1,36 @@ +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 |