summaryrefslogtreecommitdiffstats
path: root/meta/packages/busybox/busybox-1.9.1/busybox-mdev.sh
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/busybox/busybox-1.9.1/busybox-mdev.sh')
-rwxr-xr-xmeta/packages/busybox/busybox-1.9.1/busybox-mdev.sh69
1 files changed, 0 insertions, 69 deletions
diff --git a/meta/packages/busybox/busybox-1.9.1/busybox-mdev.sh b/meta/packages/busybox/busybox-1.9.1/busybox-mdev.sh
deleted file mode 100755
index 9744322fa9..0000000000
--- a/meta/packages/busybox/busybox-1.9.1/busybox-mdev.sh
+++ /dev/null
@@ -1,69 +0,0 @@
1#!/bin/sh
2MDEV=/sbin/mdev
3DESC="Busybox mdev setup"
4
5# Complain if thing's aren't right
6if [ ! -e /proc/filesystems ]; then
7 echo "mdev requires a mounted procfs, not started."
8 exit 1
9fi
10
11if ! grep -q '[[:space:]]tmpfs$' /proc/filesystems; then
12 echo "mdev requires tmpfs support, not started."
13 exit 1
14fi
15
16if [ ! -d /sys/class/ ]; then
17 echo "mdev requires a mounted sysfs, not started."
18 exit 1
19fi
20
21if [ ! -e /proc/sys/kernel/hotplug ]; then
22 echo "mdev requires hotplug support, not started."
23 exit 1
24fi
25
26# We need to unmount /dev/pts/ and remount it later over the tmpfs
27if mountpoint -q /dev/pts/; then
28 umount -l /dev/pts/
29fi
30
31if mountpoint -q /dev/shm/; then
32 umount -l /dev/shm/
33fi
34
35# Create tmpfs for /dev
36echo "Creating tmpfs at /dev"
37mount -t tmpfs tmpfs /dev -o size=800k
38
39# Register mdev as hotplug event helper
40echo "$MDEV" > /proc/sys/kernel/hotplug
41
42# Populate /dev from /sys info
43echo "Populating /dev using mdev"
44$MDEV -s
45
46# Touch .udev to inform scripts that /dev needs no further setup
47touch /dev/.udev
48
49# Mount devpts
50TTYGRP=5
51TTYMODE=620
52mkdir -m 755 -p /dev/pts
53if [ ! -e /dev/ptmx ]; then
54 mknod -m 666 /dev/ptmx c 5 2
55fi
56mount -t devpts devpts /dev/pts -onoexec,nosuid,gid=$TTYGRP,mode=$TTYMODE
57
58# Make shm directory
59mkdir -m 755 -p /dev/shm
60
61# Make extraneous links
62ln -sf /proc/self/fd /dev/fd
63ln -sf /proc/self/fd/0 /dev/stdin
64ln -sf /proc/self/fd/1 /dev/stdout
65ln -sf /proc/self/fd/2 /dev/stderr
66ln -sf /proc/kcore /dev/core
67ln -sf /proc/asound/oss/sndstat /dev/sndstat
68
69exit 0