aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorCedric Schieli <cschieli@gmail.com>2010-03-21 12:38:25 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-03-31 08:31:54 +0000
commit30a60b2df8350bb862bc64fecdfb581b9cb5011b (patch)
tree2ba07cc0c2ca43bb128137a748c555146d7534ad /main
parent29027806d47fb26652308bb1265765a8db82c76f (diff)
downloadaports-30a60b2df8350bb862bc64fecdfb581b9cb5011b.tar.bz2
aports-30a60b2df8350bb862bc64fecdfb581b9cb5011b.tar.xz
main/busybox-initscripts: add xen stuff to mdev
Signed-off-by: Cedric Schieli <cschieli@gmail.com>
Diffstat (limited to 'main')
-rw-r--r--main/busybox-initscripts/APKBUILD13
-rw-r--r--main/busybox-initscripts/mdev.conf3
-rw-r--r--main/busybox-initscripts/xvd_links12
3 files changed, 22 insertions, 6 deletions
diff --git a/main/busybox-initscripts/APKBUILD b/main/busybox-initscripts/APKBUILD
index 060721e5ce..cc26366424 100644
--- a/main/busybox-initscripts/APKBUILD
+++ b/main/busybox-initscripts/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=busybox-initscripts
-pkgver=2.0
-pkgrel=10
+pkgver=2.0_git1
+pkgrel=0
pkgdesc="Init scripts for busybox daemons"
url="http://git.alpinelinux.org/cgit/aports/tree/core/busybox-initscripts"
license="GPL-2"
@@ -13,7 +13,7 @@ subpackages=
source="acpid.initd cron.initd dnsd.initd httpd.initd inetd.initd klogd.initd
mdev-mount.initd mdev.initd rdate.initd syslog.initd watchdog.initd
cron.confd klogd.confd rdate.confd syslog.confd watchdog.confd
- mdev.conf dvbdev ide_links usbdev usbdisk_link
+ mdev.conf dvbdev ide_links usbdev usbdisk_link xvd_links
"
build() {
@@ -29,7 +29,7 @@ build() {
install -m644 "$srcdir"/$i "$pkgdir"/etc/conf.d/${i%.*} || return 1
done
install -m644 mdev.conf "$pkgdir"/etc
- install -m755 dvbdev ide_links usbdev usbdisk_link "$pkgdir"/lib/mdev/
+ install -m755 dvbdev ide_links usbdev usbdisk_link xvd_links "$pkgdir"/lib/mdev/
# poweroff script for acpid
cat >"$pkgdir"/etc/acpi/PWRF/00000080 <<EOF
@@ -55,8 +55,9 @@ b5b23dd06cea120bd8d850b54bca0b59 syslog.initd
22adbf155ffc4595206ded6daad07812 rdate.confd
77fb31a75511247bf4e3430565a276bc syslog.confd
0bb55dde32f5e119111fa4938daaef3d watchdog.confd
-2c28cc19992966db89d86ce536134407 mdev.conf
+c3eb08c577384154fdf748f1db06f8db mdev.conf
ad1556961294e4aa2abca6be52138b7c dvbdev
5c8725b4cbdeda23b00f08124a0d20bf ide_links
1acfd58dfd1cf324c90ca3a3be519510 usbdev
-30b0c85956b6701caf55309a17e537f6 usbdisk_link"
+30b0c85956b6701caf55309a17e537f6 usbdisk_link
+826d85313ca7a4a0205d63bd58b7d01f xvd_links"
diff --git a/main/busybox-initscripts/mdev.conf b/main/busybox-initscripts/mdev.conf
index 9e0b26d655..5a86a9cd6d 100644
--- a/main/busybox-initscripts/mdev.conf
+++ b/main/busybox-initscripts/mdev.conf
@@ -101,3 +101,6 @@ sr[0-9] root:cdrom 0660 @ln -sf $MDEV cdrom
# hpilo
hpilo!(.*) root:root 0660 =hpilo/%1
+
+# xen stuff
+xvd[a-z] root:root 0660 */lib/mdev/xvd_links
diff --git a/main/busybox-initscripts/xvd_links b/main/busybox-initscripts/xvd_links
new file mode 100644
index 0000000000..8874d86916
--- /dev/null
+++ b/main/busybox-initscripts/xvd_links
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+[ -f /sys/block/$MDEV/capability ] || exit
+
+caps="0x`cat /sys/block/$MDEV/capability`"
+
+if [ $(($caps & 8)) -gt 0 ]; then
+ case $ACTION in
+ add|"") ln -sf $MDEV cdrom ;;
+ remove) [ "`readlink cdrom 2>/dev/null`" = $MDEV ] && rm -f cdrom ;;
+ esac
+fi