diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-11-19 07:40:52 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-12-21 15:23:26 +0000 |
commit | 6438be2342fc3c5bdaa777db3919eea3f069b0ef (patch) | |
tree | bdba2d49d84e0bf37d9efc36fd2f83793d70ac01 | |
parent | 75a3a12a62a86f835d9cebecfab5fc172f601be9 (diff) | |
download | alpine_aports-6438be2342fc3c5bdaa777db3919eea3f069b0ef.tar.bz2 alpine_aports-6438be2342fc3c5bdaa777db3919eea3f069b0ef.tar.xz alpine_aports-6438be2342fc3c5bdaa777db3919eea3f069b0ef.zip |
main/busybox-initscripts: fix /dev/fd symlink
ref #1465
I think the initramfs create /dev/fd as a dir. When mdev-mount later runs
'ln -snf /proc/self/fd /dev/fd' the 'fd' symlink ends up as /dev/fd/fd.
We fix this by always remove /dev/fd before creating the symlink.
(cherry picked from commit 20dfee5aff22b445738a27d737b31121b709d920)
-rw-r--r-- | main/busybox-initscripts/APKBUILD | 6 | ||||
-rw-r--r-- | main/busybox-initscripts/mdev-mount.initd | 1 | ||||
-rw-r--r-- | main/busybox-initscripts/mdev.conf | 5 |
3 files changed, 6 insertions, 6 deletions
diff --git a/main/busybox-initscripts/APKBUILD b/main/busybox-initscripts/APKBUILD index ffab30c2a5..f3c513d7ca 100644 --- a/main/busybox-initscripts/APKBUILD +++ b/main/busybox-initscripts/APKBUILD | |||
@@ -2,7 +2,7 @@ | |||
2 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> | 2 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> |
3 | pkgname=busybox-initscripts | 3 | pkgname=busybox-initscripts |
4 | pkgver=2.2 | 4 | pkgver=2.2 |
5 | pkgrel=7 | 5 | pkgrel=8 |
6 | pkgdesc="Init scripts for busybox daemons" | 6 | pkgdesc="Init scripts for busybox daemons" |
7 | url="http://git.alpinelinux.org/cgit/aports/tree/core/busybox-initscripts" | 7 | url="http://git.alpinelinux.org/cgit/aports/tree/core/busybox-initscripts" |
8 | arch="noarch" | 8 | arch="noarch" |
@@ -57,7 +57,7 @@ dad20779adfb4b85b57b45c7c903a636 dnsd.initd | |||
57 | 56d24c7bd4e5d442c7436b0819017ff3 httpd.initd | 57 | 56d24c7bd4e5d442c7436b0819017ff3 httpd.initd |
58 | 7504e0700dfa85f354d31af7a58663f9 inetd.initd | 58 | 7504e0700dfa85f354d31af7a58663f9 inetd.initd |
59 | b0146b19b828051985377de1e4431a32 klogd.initd | 59 | b0146b19b828051985377de1e4431a32 klogd.initd |
60 | 12379687c0cfb5446e0cfc20bd6992bb mdev-mount.initd | 60 | 6de9bac27127a7e1dbcc86acbc920521 mdev-mount.initd |
61 | ef3e93fe17964dd600364b1340654b5b mdev.initd | 61 | ef3e93fe17964dd600364b1340654b5b mdev.initd |
62 | c01dc869cbdd68e86e64a35ccc1e885e rdate.initd | 62 | c01dc869cbdd68e86e64a35ccc1e885e rdate.initd |
63 | 4ef91ad26f5b6e64b5bc545e35f18af1 syslog.initd | 63 | 4ef91ad26f5b6e64b5bc545e35f18af1 syslog.initd |
@@ -67,7 +67,7 @@ c01dc869cbdd68e86e64a35ccc1e885e rdate.initd | |||
67 | 22adbf155ffc4595206ded6daad07812 rdate.confd | 67 | 22adbf155ffc4595206ded6daad07812 rdate.confd |
68 | 77fb31a75511247bf4e3430565a276bc syslog.confd | 68 | 77fb31a75511247bf4e3430565a276bc syslog.confd |
69 | 0bb55dde32f5e119111fa4938daaef3d watchdog.confd | 69 | 0bb55dde32f5e119111fa4938daaef3d watchdog.confd |
70 | 7ce92198c22b684fc795988461bea434 mdev.conf | 70 | d32a00a7a5cd05399dc91962870d4d07 mdev.conf |
71 | ad1556961294e4aa2abca6be52138b7c dvbdev | 71 | ad1556961294e4aa2abca6be52138b7c dvbdev |
72 | 5c8725b4cbdeda23b00f08124a0d20bf ide_links | 72 | 5c8725b4cbdeda23b00f08124a0d20bf ide_links |
73 | c422992ca5bfdfabdbba1f1532bc1358 usbdev | 73 | c422992ca5bfdfabdbba1f1532bc1358 usbdev |
diff --git a/main/busybox-initscripts/mdev-mount.initd b/main/busybox-initscripts/mdev-mount.initd index c7aaa824c2..3cbd67006c 100644 --- a/main/busybox-initscripts/mdev-mount.initd +++ b/main/busybox-initscripts/mdev-mount.initd | |||
@@ -47,6 +47,7 @@ seed_dev() | |||
47 | [ -c /dev/kmsg ] || mknod -m 660 /dev/kmsg c 1 11 | 47 | [ -c /dev/kmsg ] || mknod -m 660 /dev/kmsg c 1 11 |
48 | 48 | ||
49 | # Not provided by sysfs but needed | 49 | # Not provided by sysfs but needed |
50 | rm -rf /dev/fd | ||
50 | ln -snf /proc/self/fd /dev/fd | 51 | ln -snf /proc/self/fd /dev/fd |
51 | ln -snf fd/0 /dev/stdin | 52 | ln -snf fd/0 /dev/stdin |
52 | ln -snf fd/1 /dev/stdout | 53 | ln -snf fd/1 /dev/stdout |
diff --git a/main/busybox-initscripts/mdev.conf b/main/busybox-initscripts/mdev.conf index 69016ddf4c..ff4d4bb3b7 100644 --- a/main/busybox-initscripts/mdev.conf +++ b/main/busybox-initscripts/mdev.conf | |||
@@ -16,9 +16,8 @@ random root:root 0666 | |||
16 | urandom root:root 0444 | 16 | urandom root:root 0444 |
17 | hwrandom root:root 0660 | 17 | hwrandom root:root 0660 |
18 | 18 | ||
19 | # console does already exist; therefore ownership has to be changed with command | 19 | console root:tty 0600 |
20 | #console root:tty 0600 @chmod 600 $MDEV && mkdir -p vc && ln -sf ../$MDEV vc/0 | 20 | |
21 | console root:tty 0600 @mkdir -pm 755 fd && cd fd && for x in 0 1 2 3 ; do ln -sf /proc/self/fd/$x $x; done | ||
22 | # load frambuffer console when first frambuffer is found | 21 | # load frambuffer console when first frambuffer is found |
23 | fb0 root:video 0660 @modprobe fbcon | 22 | fb0 root:video 0660 @modprobe fbcon |
24 | 23 | ||