summaryrefslogtreecommitdiffstats
path: root/target/device/KwikByte/kb9202/target_skeleton/sbin/automount.script
blob: facce60732615dbed24e53f4da78d877c516ffe6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! /bin/sh

if [ x$ACTION = "x" ] ; then
	echo "$0: should be called by mdev"
	exit -1
fi

if [ $ACTION = "remove" ] ; then
	umount -f /dev/$MDEV
	rmdir /disk/$MDEV
	exit 0
fi

if [ $ACTION = "add" ] ; then
	mkdir -p /disk/$MDEV
	mount -o sync /dev/$MDEV /disk/$MDEV
	exit 0
fi

echo "$0: $ACTION=ACTION not recognized" > /dev/console
env > /dev/console