mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-27 22:21:51 +02:00
[package] base-files: try to activate hotplugged partitions as swap and fall back to lazy mount (#6517)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19300 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
d8377ffdca
commit
f5cd730117
@ -1,6 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
# Copyright (C) 2009-2010 OpenWrt.org
|
||||||
# Copyright (C) 2009 OpenWrt.org
|
|
||||||
|
|
||||||
blkdev=`dirname $DEVPATH`
|
blkdev=`dirname $DEVPATH`
|
||||||
if [ `basename $blkdev` != "block" ]; then
|
if [ `basename $blkdev` != "block" ]; then
|
||||||
@ -8,8 +7,10 @@ if [ `basename $blkdev` != "block" ]; then
|
|||||||
device=`basename $DEVPATH`
|
device=`basename $DEVPATH`
|
||||||
case "$ACTION" in
|
case "$ACTION" in
|
||||||
add)
|
add)
|
||||||
|
swapon /dev/$device >/dev/null 2>/dev/null || (
|
||||||
mkdir -p /mnt/$device
|
mkdir -p /mnt/$device
|
||||||
mount /dev/$device /mnt/$device
|
mount /dev/$device /mnt/$device
|
||||||
|
)
|
||||||
;;
|
;;
|
||||||
remove)
|
remove)
|
||||||
umount /dev/$device
|
umount /dev/$device
|
||||||
|
Loading…
Reference in New Issue
Block a user