Openwrt: automatic hot swapping mounting and openwrt hot swapping mounting

Source: Internet
Author: User

Openwrt: automatic hot swapping mounting and openwrt hot swapping mounting

  • Add USB support
    Kernel modules-> USB Support-> <*> kmod-usb-core. # Kernel modules-> USB Support-> <*> kmod-usb-ohci. # default old USB 1.0kernel modules-> usb Support-> <*> kmod-USB-uhci. # usb1.1Kernel modules-> USB Support-> <*> kmod-usb-storage.Kernel modules-> USB Support-> <*> kmod-usb-storage-extras.Kernel modules-> USB Support-> <*> kmod-usb2. # usb2.0 is selected by default.

  • Add SCSI support
    Kernel modules-> Block Devices-> <*> kmod-scsi-core # usb3.0 is selected by default.

  • Add USB Mount
    Base system —> <*>block-mount

  • Add File System Support
    Kernel modules-> Filesystems-> <*> kmod-fs-ext4 (choice of Mobile Disk EXT4 format) Kernel modules-> Filesystems-> <*> kmod-fs-vfat (choice of FAT16/FAT32 format) kernel modules-> Filesystems-> <*> kmod-fs-ntfs (NTFS format selection)

  • Exit and save make V = 99

Auto mount USB flash drive: edit/etc/hotplug. d/block/10-mount and write the following content
#!/bin/ashcase "$ACTION" inadd)for i in $(ls /dev/ | grep 'sd[a-z][1-9]')domkdir -p /mnt/$imount -o iocharset=utf8,rw /dev/$i /mnt/$iif [ $? -ne 0 ]thenmount -o rw /dev/$i /mnt/$ifidone;;remove)MOUNT=`mount | grep -o '/mnt/sd[a-z][1-9]'`for i in $MOUNTdoumount $iif [ $? -eq 0 ]thenrm -r $ifidone;;esac

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.