diff options
author | Cedric Schieli <cschieli@gmail.com> | 2010-03-21 12:38:25 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-03-31 08:31:54 +0000 |
commit | 30a60b2df8350bb862bc64fecdfb581b9cb5011b (patch) | |
tree | 2ba07cc0c2ca43bb128137a748c555146d7534ad /main/busybox-initscripts/xvd_links | |
parent | 29027806d47fb26652308bb1265765a8db82c76f (diff) | |
download | aports-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/busybox-initscripts/xvd_links')
-rw-r--r-- | main/busybox-initscripts/xvd_links | 12 |
1 files changed, 12 insertions, 0 deletions
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 |