diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-06-11 13:25:47 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-06-11 13:25:47 +0000 |
commit | b0a83e81230c8a6e83c139307079b33c1cd9441f (patch) | |
tree | 20143364d9c11290b536b94783c8104242b872bc /core/busybox-initscripts/ide_links | |
parent | f0ce46793efe6e5386086cc035e8fa1cb81c1b43 (diff) | |
download | aports-b0a83e81230c8a6e83c139307079b33c1cd9441f.tar.bz2 aports-b0a83e81230c8a6e83c139307079b33c1cd9441f.tar.xz |
core/busybox-initscripts: added klogd script and mdev stuff
we split the syslogd and klogd into different scripts since klog should
not be run in vserver while syslog should.
the mdev config and helper scripts were moved from alpine-baselayout too
Diffstat (limited to 'core/busybox-initscripts/ide_links')
-rw-r--r-- | core/busybox-initscripts/ide_links | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/core/busybox-initscripts/ide_links b/core/busybox-initscripts/ide_links new file mode 100644 index 0000000000..be0c95aa9c --- /dev/null +++ b/core/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" + |