mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 17:18:59 +00:00
3634de3b80
SVN-Revision: 19300
21 lines
347 B
Bash
21 lines
347 B
Bash
#!/bin/sh
|
|
# Copyright (C) 2009-2010 OpenWrt.org
|
|
|
|
blkdev=`dirname $DEVPATH`
|
|
if [ `basename $blkdev` != "block" ]; then
|
|
|
|
device=`basename $DEVPATH`
|
|
case "$ACTION" in
|
|
add)
|
|
swapon /dev/$device >/dev/null 2>/dev/null || (
|
|
mkdir -p /mnt/$device
|
|
mount /dev/$device /mnt/$device
|
|
)
|
|
;;
|
|
remove)
|
|
umount /dev/$device
|
|
;;
|
|
esac
|
|
|
|
fi
|