You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/bin/sh
# Copyright (C) 2015 OpenWrt.org
# 0 yes blockdevice handles this - 1 no it is not there
blkdev=`dirname $DEVPATH`
basename=`basename $blkdev`
device=`basename $DEVPATH`
skip=`block info | sed 's/\(.*\): .*/\1/' | grep -q $device ; echo $?`
path=$DEVPATH
if [ $basename != "block" ] && [ -z "${device##sd*}" ] && [ $skip -eq 1 ]; then
islabel=`blkid /dev/$device | grep -q LABEL ; echo $?`
if [ $islabel -eq 0 ] ; then
mntpnt=`blkid /dev/$device |sed 's/.*LABEL="\(.*\)" UUID.*/\1/'`
else
mntpnt=$device
fi
case "$ACTION" in
add)
mkdir -p /export/$mntpnt
# Set APM value for automatic spin down
/sbin/hdparm -B 127 /dev/$device
# Try to be gentle on solid state devices
mount -o rw,noatime,discard /dev/$device /export/$mntpnt
;;
remove)
# Once the device is removed, the /dev entry disappear. We need mountpoint
mountpoint=`mount |grep /dev/$device | sed 's/.* on \(.*\) type.*/\1/'`
umount -l $mountpoint
;;
esac
fi
The text was updated successfully, but these errors were encountered:
修改
package/system/fstools/files/mount.hotplug
文件为以下内容:The text was updated successfully, but these errors were encountered: