Root/package/base-files/files/lib/preinit/20_device_fs_mount

1#!/bin/sh
2# Copyright (C) 2006 OpenWrt.org
3# Copyright (C) 2010 Vertical Communications
4
5do_mount_devfs() {
6    mount devfs /dev -t devfs
7}
8
9do_mount_hotplug() {
10    mount -t tmpfs tmpfs /dev -o mode=0755,size=512K
11}
12
13do_mount_udev() {
14    mount -n -t tmpfs -o mode=0755 udev /dev
15}
16
17choose_device_fs() {
18    if grep -q devfs /proc/filesystems; then
19        do_mount_devfs
20    elif [ -x /sbin/hotplug2 ]; then
21        do_mount_hotplug
22    elif [ -x /sbin/udevd ]; then
23        do_mount_udev
24    fi
25}
26
27boot_hook_add preinit_essential choose_device_fs
28
29

Archive Download this file



interactive