Commit 6438be23 authored by Natanael Copa's avatar Natanael Copa

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 20dfee5a)
parent 75a3a12a
......@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=busybox-initscripts
pkgver=2.2
pkgrel=7
pkgrel=8
pkgdesc="Init scripts for busybox daemons"
url="http://git.alpinelinux.org/cgit/aports/tree/core/busybox-initscripts"
arch="noarch"
......@@ -57,7 +57,7 @@ dad20779adfb4b85b57b45c7c903a636 dnsd.initd
56d24c7bd4e5d442c7436b0819017ff3 httpd.initd
7504e0700dfa85f354d31af7a58663f9 inetd.initd
b0146b19b828051985377de1e4431a32 klogd.initd
12379687c0cfb5446e0cfc20bd6992bb mdev-mount.initd
6de9bac27127a7e1dbcc86acbc920521 mdev-mount.initd
ef3e93fe17964dd600364b1340654b5b mdev.initd
c01dc869cbdd68e86e64a35ccc1e885e rdate.initd
4ef91ad26f5b6e64b5bc545e35f18af1 syslog.initd
......@@ -67,7 +67,7 @@ c01dc869cbdd68e86e64a35ccc1e885e rdate.initd
22adbf155ffc4595206ded6daad07812 rdate.confd
77fb31a75511247bf4e3430565a276bc syslog.confd
0bb55dde32f5e119111fa4938daaef3d watchdog.confd
7ce92198c22b684fc795988461bea434 mdev.conf
d32a00a7a5cd05399dc91962870d4d07 mdev.conf
ad1556961294e4aa2abca6be52138b7c dvbdev
5c8725b4cbdeda23b00f08124a0d20bf ide_links
c422992ca5bfdfabdbba1f1532bc1358 usbdev
......
......@@ -47,6 +47,7 @@ seed_dev()
[ -c /dev/kmsg ] || mknod -m 660 /dev/kmsg c 1 11
# Not provided by sysfs but needed
rm -rf /dev/fd
ln -snf /proc/self/fd /dev/fd
ln -snf fd/0 /dev/stdin
ln -snf fd/1 /dev/stdout
......
......@@ -16,9 +16,8 @@ random root:root 0666
urandom root:root 0444
hwrandom root:root 0660
# console does already exist; therefore ownership has to be changed with command
#console root:tty 0600 @chmod 600 $MDEV && mkdir -p vc && ln -sf ../$MDEV vc/0
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
console root:tty 0600
# load frambuffer console when first frambuffer is found
fb0 root:video 0660 @modprobe fbcon
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment