summaryrefslogtreecommitdiffstats
path: root/subdir_dev
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-06-11 06:54:07 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-06-11 06:54:07 +0000
commitec29e1265d3d9d66c14fc564898220351a6c2efd (patch)
tree65767f9976481e3002fde7d513ae8fa2c11569bb /subdir_dev
parent6b92f0bd235572c715d6956b4b41659c1423138c (diff)
downloadalpine-baselayout-ec29e1265d3d9d66c14fc564898220351a6c2efd.tar.bz2
alpine-baselayout-ec29e1265d3d9d66c14fc564898220351a6c2efd.tar.xz
remove mdev stuff that moved to busybox-initscripts
Diffstat (limited to 'subdir_dev')
-rw-r--r--subdir_dev47
1 files changed, 0 insertions, 47 deletions
diff --git a/subdir_dev b/subdir_dev
deleted file mode 100644
index 1cc6b03..0000000
--- a/subdir_dev
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/sh
-
-# scripts that moves devices to the $1/ subdir.
-# usage: subdir_dev [-ln] DIR [NEW_NAME]
-# options:
-# -l create link (i.e. /dev/pcm0 -> /dev/snd/pcm0)
-# -n devicename from number (i.e. /dev/loop0 => /dev/loop/0)
-
-while getopts "ln" opt; do
- case "$opt" in
- l) link=1
- ;;
- n) dev=${MDEV%[0-9]*}
- new_name=${MDEV#${dev}}
- ;;
- esac
-done
-shift $(( $OPTIND - 1 ))
-
-if [ -n "$2" ]; then
- new_name="$2"
-fi
-
-if [ -z "$new_name" ]; then
- new_name=$MDEV
-fi
-
-case "$ACTION" in
- add|"")
- if [ ! -b "$MDEV" ] && [ ! -c "$MDEV" ]; then
- exit
- fi
- mkdir -p $1
- mv $MDEV $1/$new_name
- if [ "$link" = 1 ] ; then
- ln -snf $1/$new_name $MDEV
- fi
- ;;
- remove)
- if [ "$link" = 1 ] ; then
- rm -f $MDEV
- fi
- mv $1/$new_name $MDEV
- rmdir $1 2>/dev/null
- ;;
-esac
-