38968933fa58df73aa84ccc7a279a7292f4036db
[openwrt.git] / package / base-files / files / etc / hotplug.d / block / 10-mount
1 #!/bin/sh
2 # Copyright (C) 2009-2010 OpenWrt.org
3
4 blkdev=`dirname $DEVPATH`
5 if [ `basename $blkdev` != "block" ]; then
6
7 device=`basename $DEVPATH`
8 case "$ACTION" in
9 add)
10 swapon /dev/$device >/dev/null 2>/dev/null || (
11 mkdir -p /mnt/$device
12 mount /dev/$device /mnt/$device
13 )
14 ;;
15 remove)
16 umount /dev/$device
17 ;;
18 esac
19
20 fi
This page took 0.055984 seconds and 3 git commands to generate.