1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-01-18 21:31:07 +02:00

21 lines
347 B
Plaintext
Raw Normal View History

#!/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