diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-07-23 18:24:11 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-07-23 18:24:11 +0000 |
commit | 2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd (patch) | |
tree | a63d3b3b1c89018b5419358eed5c2bb0acf1cd92 /main/busybox-initscripts/ide_links | |
parent | e374901731eb35599bd6735de4dd38560e3a79b8 (diff) | |
download | aports-2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd.tar.bz2 aports-2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd.tar.xz |
move core/* to main/
added maintainer to several packages as well
Diffstat (limited to 'main/busybox-initscripts/ide_links')
-rw-r--r-- | main/busybox-initscripts/ide_links | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/main/busybox-initscripts/ide_links b/main/busybox-initscripts/ide_links new file mode 100644 index 000000000..be0c95aa9 --- /dev/null +++ b/main/busybox-initscripts/ide_links @@ -0,0 +1,23 @@ +#!/bin/sh + +[ -f /proc/ide/$MDEV/media ] || exit + +media=`cat /proc/ide/$MDEV/media` +for i in $media $media[0-9]* ; do + if [ "`readlink $i 2>/dev/null`" = $MDEV ] ; then + LINK=$i + break + fi +done + +# link exist, remove if necessary and exit +if [ "$LINK" ] ; then + [ "$ACTION" = remove ] && rm $LINK + exit +fi + +# create a link +num=`ls $media[0-9]* 2>/dev/null | wc -l` +ln -sf $MDEV "$media`echo $num`" +[ -e "$media" ] || ln -sf $MDEV "$media" + |