public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in sys-fs/udev/files/147: udev-postmount.initd udev.initd shell-compat-addon.sh udev-mount.initd
@ 2009-10-20 12:38 Matthias Schwarzott (zzam)
  0 siblings, 0 replies; only message in thread
From: Matthias Schwarzott (zzam) @ 2009-10-20 12:38 UTC (permalink / raw
  To: gentoo-commits

zzam        09/10/20 12:38:15

  Modified:             udev-postmount.initd udev.initd
                        shell-compat-addon.sh udev-mount.initd
  Log:
  Update init-scripts. udev-postmount should be in default runlevel. No longer handle it like a synthetic hotplug event. Let it rerun failed events. Handle devtmpfs if supported, and also the case /dev is already mounted. Do not run net.* init-scripts if the new network init-script is used. Cleanup of pre/postinst code.
  (Portage version: 2.2_rc46/cvs/Linux i686)

Revision  Changes    Path
1.2                  sys-fs/udev/files/147/udev-postmount.initd

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/147/udev-postmount.initd?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/147/udev-postmount.initd?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/147/udev-postmount.initd?r1=1.1&r2=1.2

Index: udev-postmount.initd
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-fs/udev/files/147/udev-postmount.initd,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- udev-postmount.initd	15 Oct 2009 21:40:44 -0000	1.1
+++ udev-postmount.initd	20 Oct 2009 12:38:14 -0000	1.2
@@ -1,7 +1,7 @@
 #!/sbin/runscript
 # Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/files/147/udev-postmount.initd,v 1.1 2009/10/15 21:40:44 zzam Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/files/147/udev-postmount.initd,v 1.2 2009/10/20 12:38:14 zzam Exp $
 
 depend() {
 	need localmount
@@ -17,9 +17,6 @@
 	# check if this system uses udev
 	[ -d /dev/.udev/ ] || return 0
 
-	# disable coldplug stop from /etc/init.d/udev trigger
-	udevadm control --env do_not_run_plug_service=
-
 	# Run the events that failed at first udev trigger
 	udevadm trigger --type=failed -v
 



1.2                  sys-fs/udev/files/147/udev.initd

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/147/udev.initd?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/147/udev.initd?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/147/udev.initd?r1=1.1&r2=1.2

Index: udev.initd
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-fs/udev/files/147/udev.initd,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- udev.initd	15 Oct 2009 21:40:44 -0000	1.1
+++ udev.initd	20 Oct 2009 12:38:14 -0000	1.2
@@ -115,8 +115,10 @@
 	fi
 	eend $?
 
-	# we can speed up booting by not waiting for udev to finish event-processing
-	# if using devtmpfs so that kernel already created the device nodes for us
+	# we can speed up booting under these conditions:
+	#  * using devtmpfs so kernel creates device nodes for us
+	#  * only using kernel created device nodes at boot (in /etc/fstab and elsewhere)
+	#
 	ebegin "Waiting for uevents to be processed"
 	udevadm settle --timeout=${udev_settle_timeout:-60}
 	eend $?



1.2                  sys-fs/udev/files/147/shell-compat-addon.sh

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/147/shell-compat-addon.sh?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/147/shell-compat-addon.sh?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/147/shell-compat-addon.sh?r1=1.1&r2=1.2

Index: shell-compat-addon.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-fs/udev/files/147/shell-compat-addon.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- shell-compat-addon.sh	15 Oct 2009 21:40:44 -0000	1.1
+++ shell-compat-addon.sh	20 Oct 2009 12:38:14 -0000	1.2
@@ -20,10 +20,27 @@
 	}
 fi
 
+# does not exist in baselayout-1, does exist in openrc
+#
+# mountinfo <path>
+# check if some filesystem is mounted at mountpoint <path>
+#
+# return value:
+#   0 filesystem is mounted at <path>
+#   1 no filesystem is mounted exactly at <path>
 if ! cmd_exist mountinfo; then
 	mountinfo() {
-		# returning false makes the behaviour same as without check
-		return 1
+		[ "$1" = "-q" ] && shift
+		local dir="$1"
+
+		# check if entry is in /proc/mounts
+		local ret=$(gawk 'BEGIN { found="false"; }
+				  $1 ~ "^#" { next }
+				  $2 == "'$dir'" { found="true"; }
+				  END { print found; }
+			    ' /proc/mounts)
+
+		"${ret}"
 	}
 fi
 



1.2                  sys-fs/udev/files/147/udev-mount.initd

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/147/udev-mount.initd?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/147/udev-mount.initd?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/files/147/udev-mount.initd?r1=1.1&r2=1.2

Index: udev-mount.initd
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-fs/udev/files/147/udev-mount.initd,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- udev-mount.initd	15 Oct 2009 21:40:44 -0000	1.1
+++ udev-mount.initd	20 Oct 2009 12:38:14 -0000	1.2
@@ -30,14 +30,20 @@
 
 mount_dev_directory()
 {
-	mountinfo -q /dev && return 0
+	if mountinfo -q /dev; then
+		einfo "/dev is already mounted"
+		return 0
+	fi
 
 	# No options are processed here as they should all be in /etc/fstab
 	ebegin "Mounting /dev"
 	if ! fstabinfo --mount /dev; then
+		# we mount devtmpfs if supported
+		local fs=tmpfs
+		grep -qs devtmpfs /proc/filesystems && fs=devtmpfs
+
 		# Some devices require exec, Bug #92921
-		# we could mount devtmpfs if supported
-		mount -n -t tmpfs -o "exec,nosuid,mode=0755,size=10M" udev /dev
+		mount -n -t "$fs" -o "exec,nosuid,mode=0755,size=10M" udev /dev
 	fi
 	eend $?
 }






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-10-20 12:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-20 12:38 [gentoo-commits] gentoo-x86 commit in sys-fs/udev/files/147: udev-postmount.initd udev.initd shell-compat-addon.sh udev-mount.initd Matthias Schwarzott (zzam)

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