找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 2116|回复: 4

编译openwrt固件修改好了10-mount自动挂USB脚本问题?

[复制链接]
编译openwrt固件修改好了10-mount自动挂USB脚本,路径build_dir/target-mipsel_24kc_musl/root-ramips/etc/hotplug.d/block/10-mount保存好了输入make V=99编译固件,编译好的固件路由器刷机好了WinSCP打开/etc/hotplug.d/block/10-moun内容还是sbin/block hotplug
这要怎么着啊?谢谢!!!





我的恩山、我的无线 The best wifi forum is right here.
 楼主| | 显示全部楼层
脚本:
#!/bin/sh
# Copyright (C) 2011 OpenWrt.org
sleep 10 #more apps installed, need more time to load kernel modules!
blkdev=`dirname $DEVPATH`
if [ `basename $blkdev` != "block" ]; then
        device=`basename $DEVPATH`
        case "$ACTION" in
                add)
                        mkdir -p /mnt/$device
                        # vfat & ntfs-3g check
                        if [ `which fdisk` ]; then
                                isntfs=`fdisk -l | grep $device | grep NTFS`
                                isvfat=`fdisk -l | grep $device | grep FAT`
                                isfuse=`lsmod | grep fuse`
                                isntfs3g=`which ntfs-3g`
                        else
                                isntfs=""
                                isvfat=""
                        fi

                        # mount with ntfs-3g if possible, else with default mount
                        if [ "$isntfs" -a "$isfuse" -a "$isntfs3g" ]; then
                                ntfs-3g /dev/$device /mnt/$device
                        elif [ "$isvfat" ]; then
                                mount -o iocharset=utf8 /dev/$device /mnt/$device
                        else
                                mount /dev/$device /mnt/$device
                        fi
                ;;
                remove)
                        umount -l /dev/$device
                ;;
        esac
fi
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
/home/lede/source/staging_dir/target-mipsel_24kc_musl/root-ramips/etc/hotplug.d/block/10-mount也改了还是不行
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
把文件放入/home/lede/source/package/base-files/files/etc/hotplug.d/block/10-mount 编译固件出错。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
路由重启输入命令

mkdir -p /mnt/sta
mount /dev/sda /mnt/sda
每次路由重启输入 #挂载
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-27 19:38

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表