public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in sys-apps/busybox/files: mdev-start.sh
@ 2008-04-20  1:17 Mike Frysinger (vapier)
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger (vapier) @ 2008-04-20  1:17 UTC (permalink / raw
  To: gentoo-commits

vapier      08/04/20 01:17:49

  Modified:             mdev-start.sh
  Log:
  Add support for baselayout-2 and create /dev/null before we use it #211827.
  (Portage version: 2.2_pre5)

Revision  Changes    Path
1.3                  sys-apps/busybox/files/mdev-start.sh

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/files/mdev-start.sh?rev=1.3&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/files/mdev-start.sh?rev=1.3&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/files/mdev-start.sh?r1=1.2&r2=1.3

Index: mdev-start.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/busybox/files/mdev-start.sh,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mdev-start.sh	28 May 2007 01:47:37 -0000	1.2
+++ mdev-start.sh	20 Apr 2008 01:17:49 -0000	1.3
@@ -1,7 +1,8 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-find_mdev() {
+find_mdev()
+{
 	if [ -x /sbin/mdev ] ; then
 		echo "/sbin/mdev"
 	else
@@ -9,7 +10,8 @@
 	fi
 }
 
-populate_mdev() {
+populate_mdev()
+{
 	# populate /dev with devices already found by the kernel
 
 	if get_bootparam "nocoldplug" ; then
@@ -24,18 +26,22 @@
 	return 0
 }
 
-seed_dev() {
+seed_dev()
+{
 	# Seed /dev with some things that we know we need
-	ebegin "Seeding /dev with needed nodes"
 
 	# creating /dev/console and /dev/tty1 to be able to write
 	# to $CONSOLE with/without bootsplash before mdev creates it
-	[ ! -c /dev/console ] && mknod /dev/console c 5 1
-	[ ! -c /dev/tty1 ] && mknod /dev/tty1 c 4 1
+	[ -c /dev/console ] || mknod /dev/console c 5 1
+	[ -c /dev/tty1 ] || mknod /dev/tty1 c 4 1
+
+	# udevd will dup its stdin/stdout/stderr to /dev/null
+	# and we do not want a file which gets buffered in ram
+	[ -c /dev/null ] || mknod /dev/null c 1 3
 
 	# copy over any persistant things
 	if [ -d /lib/mdev/devices ] ; then
-		cp --preserve=all --recursive --update /lib/mdev/devices/* /dev 2>/dev/null
+		cp -RPp /lib/mdev/devices/* /dev 2>/dev/null
 	fi
 
 	# Not provided by sysfs but needed
@@ -47,12 +53,10 @@
 
 	# Create problematic directories
 	mkdir -p /dev/pts /dev/shm
-	eend 0
 }
 
-main() {
-	# Setup temporary storage for /dev
-	ebegin "Mounting /dev for mdev"
+mount_it_b1()
+{
 	if [ "${RC_USE_FSTAB}" = "yes" ] ; then
 		mntcmd=$(get_mount_fstab /dev)
 	else
@@ -69,6 +73,26 @@
 		# many video drivers require exec access in /dev #92921
 		try mount -n -t "${mntcmd}" -o exec,nosuid,mode=0755 mdev /dev
 	fi
+}
+mount_it_b2()
+{
+	if fstabinfo --quiet /dev ; then
+		mount -n /dev
+	else
+		# Some devices require exec, Bug #92921
+		mount -n -t tmpfs -o "exec,nosuid,mode=0755,size=10M" mdev /dev
+	fi
+}
+mount_it()
+{
+	type fstabinfo && mount_b2 || mount_b1
+}
+
+main()
+{
+	# Setup temporary storage for /dev
+	ebegin "Mounting /dev for mdev"
+	mount_it
 	eend $?
 
 	# Create a file so that our rc system knows it's still in sysinit.



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gentoo-commits] gentoo-x86 commit in sys-apps/busybox/files: mdev-start.sh
@ 2008-05-04  9:14 Mike Frysinger (vapier)
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger (vapier) @ 2008-05-04  9:14 UTC (permalink / raw
  To: gentoo-commits

vapier      08/05/04 09:14:52

  Modified:             mdev-start.sh
  Log:
  Fix typos in mount #220028 by Dave Bender.
  (Portage version: 2.2_pre5)

Revision  Changes    Path
1.4                  sys-apps/busybox/files/mdev-start.sh

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/files/mdev-start.sh?rev=1.4&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/files/mdev-start.sh?rev=1.4&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/files/mdev-start.sh?r1=1.3&r2=1.4

Index: mdev-start.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/busybox/files/mdev-start.sh,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- mdev-start.sh	20 Apr 2008 01:17:49 -0000	1.3
+++ mdev-start.sh	4 May 2008 09:14:52 -0000	1.4
@@ -85,7 +85,7 @@
 }
 mount_it()
 {
-	type fstabinfo && mount_b2 || mount_b1
+	type fstabinfo && mount_it_b2 || mount_it_b1
 }
 
 main()



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-04  9:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-04  9:14 [gentoo-commits] gentoo-x86 commit in sys-apps/busybox/files: mdev-start.sh Mike Frysinger (vapier)
  -- strict thread matches above, loose matches on Subject: below --
2008-04-20  1:17 Mike Frysinger (vapier)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox