aboutsummaryrefslogtreecommitdiffstats
path: root/core/busybox-initscripts/usbdisk_link
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-07-23 18:24:11 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-07-23 18:24:11 +0000
commit2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd (patch)
treea63d3b3b1c89018b5419358eed5c2bb0acf1cd92 /core/busybox-initscripts/usbdisk_link
parente374901731eb35599bd6735de4dd38560e3a79b8 (diff)
downloadaports-2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd.tar.bz2
aports-2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd.tar.xz
move core/* to main/
added maintainer to several packages as well
Diffstat (limited to 'core/busybox-initscripts/usbdisk_link')
-rw-r--r--core/busybox-initscripts/usbdisk_link34
1 files changed, 0 insertions, 34 deletions
diff --git a/core/busybox-initscripts/usbdisk_link b/core/busybox-initscripts/usbdisk_link
deleted file mode 100644
index 750242bb5c..0000000000
--- a/core/busybox-initscripts/usbdisk_link
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-
-# NOTE: since mdev -s only provide $MDEV, don't depend on any hotplug vars.
-
-current=$(readlink usbdisk)
-
-if [ "$current" = "$MDEV" ] && [ "$ACTION" = "remove" ]; then
- rm -f usbdisk usba1
-fi
-[ -n "$current" ] && exit
-
-if [ -e /sys/block/$MDEV ]; then
- SYSDEV=$(readlink -f /sys/block/$MDEV/device)
- # 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 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
- ln -sf $MDEV usba1
- fi
-
-elif [ -e /sys/block/*/$MDEV ] ; then
- PARENT=$(dirname /sys/block/*/$MDEV)
- SYSDEV=$(readlink -f $PARENT/device)
- if [ "${SYSDEV##*/usb[0-9]}" != "$SYSDEV" ]; then
- ln -sf $MDEV usbdisk
- # keep this for compat. people have it in fstab
- ln -sf $MDEV usba1
- fi
-fi
-