Skip to content
Snippets Groups Projects
Commit a0f72a6d authored by Natanael Copa's avatar Natanael Copa
Browse files

core/busybox-initscripts: check if /dev is mounted

we also move mdev so sysinit in post-install
parent d4e04d79
No related branches found
No related tags found
No related merge requests found
...@@ -2,18 +2,19 @@ ...@@ -2,18 +2,19 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=busybox-initscripts pkgname=busybox-initscripts
pkgver=2.0 pkgver=2.0
pkgrel=1 pkgrel=2
pkgdesc="Init scripts for busybox daemons" pkgdesc="Init scripts for busybox daemons"
url="http://git.alpinelinux.org/cgit/aports/tree/core/busybox-initscripts" url="http://git.alpinelinux.org/cgit/aports/tree/core/busybox-initscripts"
license="GPL-2" license="GPL-2"
depends="busybox" depends="busybox"
makedepends= makedepends=
install= install=$pkgname.post-install
subpackages= subpackages=
source="cron.initd dnsd.initd httpd.initd inetd.initd klogd.initd source="cron.initd dnsd.initd httpd.initd inetd.initd klogd.initd
mdev-mount.initd mdev.initd rdate.initd syslog.initd watchdog.initd mdev-mount.initd mdev.initd rdate.initd syslog.initd watchdog.initd
cron.confd klogd.confd rdate.confd syslog.confd watchdog.confd cron.confd klogd.confd rdate.confd syslog.confd watchdog.confd
mdev.conf dvbdev ide_links usbdev usbdisk_link" mdev.conf dvbdev ide_links usbdev usbdisk_link
$install"
build() { build() {
local i local i
...@@ -35,7 +36,7 @@ md5sums="45b4ca78fad54f56018b9a2e9358dc68 cron.initd ...@@ -35,7 +36,7 @@ md5sums="45b4ca78fad54f56018b9a2e9358dc68 cron.initd
f7daf05f9984aa398fdbd3fe02e82678 httpd.initd f7daf05f9984aa398fdbd3fe02e82678 httpd.initd
dad8e381142dfb42483de324aff4cf28 inetd.initd dad8e381142dfb42483de324aff4cf28 inetd.initd
e22077bfe7b8b0fe7c06cfe208e68dca klogd.initd e22077bfe7b8b0fe7c06cfe208e68dca klogd.initd
823308d5691bd6ece04a040b23925d40 mdev-mount.initd 12379687c0cfb5446e0cfc20bd6992bb mdev-mount.initd
ef3e93fe17964dd600364b1340654b5b mdev.initd ef3e93fe17964dd600364b1340654b5b mdev.initd
533288e7df1fdfc029b1048b8e6c770f rdate.initd 533288e7df1fdfc029b1048b8e6c770f rdate.initd
b5b23dd06cea120bd8d850b54bca0b59 syslog.initd b5b23dd06cea120bd8d850b54bca0b59 syslog.initd
...@@ -49,4 +50,5 @@ b5b23dd06cea120bd8d850b54bca0b59 syslog.initd ...@@ -49,4 +50,5 @@ b5b23dd06cea120bd8d850b54bca0b59 syslog.initd
ad1556961294e4aa2abca6be52138b7c dvbdev ad1556961294e4aa2abca6be52138b7c dvbdev
5c8725b4cbdeda23b00f08124a0d20bf ide_links 5c8725b4cbdeda23b00f08124a0d20bf ide_links
1acfd58dfd1cf324c90ca3a3be519510 usbdev 1acfd58dfd1cf324c90ca3a3be519510 usbdev
30b0c85956b6701caf55309a17e537f6 usbdisk_link" 30b0c85956b6701caf55309a17e537f6 usbdisk_link
038db8453f57a36afaee2a4d883008e4 busybox-initscripts.post-install"
#!/bin/sh
# this is for upgraders
if [ -L /etc/runlevels/boot/mdev ]; then
mkdir -p /etc/runlevels/sysinit
mv /etc/runlevels/boot/mdev /etc/runlevels/sysinit/ 2>/dev/null
fi
exit 0
...@@ -9,6 +9,14 @@ description="Mount tmpfs on /dev" ...@@ -9,6 +9,14 @@ description="Mount tmpfs on /dev"
mount_dev_directory() mount_dev_directory()
{ {
if [ "$(mountinfo -t /dev)" = "mdev" ]; then
# already mounted
if fstabinfo --quiet /dev; then
mount -o remount -n /dev
fi
return 0
fi
# No options are processed here as they should all be in /etc/fstab # No options are processed here as they should all be in /etc/fstab
ebegin "Mounting /dev" ebegin "Mounting /dev"
mkdir -p /dev mkdir -p /dev
...@@ -16,7 +24,7 @@ mount_dev_directory() ...@@ -16,7 +24,7 @@ mount_dev_directory()
mount -n /dev mount -n /dev
else else
# Some devices require exec, Bug #92921 # Some devices require exec, Bug #92921
mount -n -t tmpfs -o "exec,nosuid,mode=0755,size=10M" mdev /dev mount -n -t tmpfs -o "exec,nosuid,mode=0755,size=1M" mdev /dev
fi fi
eend $? eend $?
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment