public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/, conf.d/
@ 2014-11-25 20:58 William Hubbs
  0 siblings, 0 replies; 7+ messages in thread
From: William Hubbs @ 2014-11-25 20:58 UTC (permalink / raw
  To: gentoo-commits

commit:     ebb3f35bd06591bf7092cfc61e5cd51857ed888f
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Mon Nov  3 20:31:08 2014 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Nov 25 20:43:15 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/udev-gentoo-scripts.git;a=commit;h=ebb3f35b

split the udev service

The udev service now has been split into three services: udev starts the
daemon, udev-trigger populates /dev and udev-settle waits for all udev
events to time out.

udev and udev-trigger will be needed in the sysinit runlevel; however,
udev-settle will not on most systems.

---
 conf.d/udev                   | 38 ------------------
 conf.d/udev-settle            |  5 +++
 conf.d/{udev => udev-trigger} | 17 +-------
 init.d/udev                   | 92 -------------------------------------------
 init.d/udev-settle            | 17 ++++++++
 init.d/udev-trigger           | 91 ++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 114 insertions(+), 146 deletions(-)

diff --git a/conf.d/udev b/conf.d/udev
index 41f6b9b..a714032 100644
--- a/conf.d/udev
+++ b/conf.d/udev
@@ -1,31 +1,5 @@
 # /etc/conf.d/udev: config file for udev
 
-# udev can trigger coldplug events which cause services to start and
-# kernel modules to be loaded.
-# Services are deferred to start in the boot runlevel.
-# Set rc_coldplug="NO" if you don't want this.
-# If you want module coldplugging but not coldplugging of services then you
-# can disable service coldplugging in baselayout/openrc config files.
-# The setting is named different in different versions.
-# in /etc/rc.conf: rc_hotplug="!*" or
-# in /etc/conf.d/rc: rc_plug_services="!*"
-#rc_coldplug="YES"
-
-# We can create a /dev/root symbolic link to point to the root device in
-# some situations. This is on by default because some software relies on
-# it,. However, this software should be fixed to not do this.
-# For more information, see
-# https://bugs.gentoo.org/show_bug.cgi?id=438380.
-# If you are not using any affected software, you do not need this, so
-# feel free to turn it off.
-#rc_dev_root_symlink="YES"
-
-# Expert options:
-
-# Timeout in seconds to wait for processing of uevents at boot.
-# There should be no need to change this.
-#udev_settle_timeout="60"
-
 # Add extra command line options to udevd, use with care
 # udevd --help for possible values
 #udev_opts=""
@@ -33,15 +7,3 @@
 # Run udevd --debug and write output to /run/udevdebug.log
 # Should not be kept on as it fills diskspace slowly
 #udev_debug="YES"
-
-# Run udevadmin monitor to get a log of all events
-# in /run/udevmonitor.log
-#udev_monitor="YES"
-
-# Keep udevmonitor running after populating /dev.
-#udev_monitor_keep_running="no"
-
-# Set cmdline options for udevmonitor.
-# could be some of --env --kernel --udev
-#udev_monitor_opts="--env"
-

diff --git a/conf.d/udev-settle b/conf.d/udev-settle
new file mode 100644
index 0000000..b83580a
--- /dev/null
+++ b/conf.d/udev-settle
@@ -0,0 +1,5 @@
+# /etc/conf.d/udev-settle: config file for udev-settle
+
+# Timeout in seconds to wait for processing of uevents at boot.
+# There should be no need to change this.
+#udev_settle_timeout="60"

diff --git a/conf.d/udev b/conf.d/udev-trigger
similarity index 73%
copy from conf.d/udev
copy to conf.d/udev-trigger
index 41f6b9b..5850b8b 100644
--- a/conf.d/udev
+++ b/conf.d/udev-trigger
@@ -1,4 +1,4 @@
-# /etc/conf.d/udev: config file for udev
+# /etc/conf.d/udev-trigger: config file for udev-trigger
 
 # udev can trigger coldplug events which cause services to start and
 # kernel modules to be loaded.
@@ -20,20 +20,6 @@
 # feel free to turn it off.
 #rc_dev_root_symlink="YES"
 
-# Expert options:
-
-# Timeout in seconds to wait for processing of uevents at boot.
-# There should be no need to change this.
-#udev_settle_timeout="60"
-
-# Add extra command line options to udevd, use with care
-# udevd --help for possible values
-#udev_opts=""
-
-# Run udevd --debug and write output to /run/udevdebug.log
-# Should not be kept on as it fills diskspace slowly
-#udev_debug="YES"
-
 # Run udevadmin monitor to get a log of all events
 # in /run/udevmonitor.log
 #udev_monitor="YES"
@@ -44,4 +30,3 @@
 # Set cmdline options for udevmonitor.
 # could be some of --env --kernel --udev
 #udev_monitor_opts="--env"
-

diff --git a/init.d/udev b/init.d/udev
index 654eee3..57fae76 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -7,12 +7,8 @@ description="udev manages device permissions and symbolic links in /dev"
 extra_started_commands="reload"
 description_reload="Reload the udev rules and databases"
 
-udevmonitor_log=/run/udevmonitor.log
-udevmonitor_pid=/run/udevmonitor.pid
-
 depend()
 {
-	provide dev
 	need sysfs dev-mount
 	before checkfs fsck
 
@@ -73,94 +69,6 @@ start_pre()
 	return 0
 }
 
-start_udevmonitor()
-{
-	yesno "${udev_monitor:-no}" || return 0
-
-	einfo "udev: Running udevadm monitor ${udev_monitor_opts} to log all events"
-	start-stop-daemon --start --stdout "${udevmonitor_log}" \
-		--make-pidfile --pidfile "${udevmonitor_pid}" \
-		--background --exec /bin/udevadm -- monitor ${udev_monitor_opts}
-}
-
-# This is here because some software expects /dev/root to exist.
-# For more information, see this bug:
-# https://bugs.gentoo.org/show_bug.cgi?id=438380
-dev_root_link()
-{
-	local RULESDIR=/run/udev/rules.d
-	[ -d $RULESDIR ] || mkdir -p $RULESDIR
-	eval $(udevadm info --export --export-prefix=ROOT_ --device-id-of-file=/ ||
-		true)
-	[ "$ROOT_MAJOR" -a "$ROOT_MINOR" ] || return 0
-
-	# btrfs filesystems have bogus major/minor numbers
-	[ "$ROOT_MAJOR" != 0 ] || return 0
-
-	echo 'ACTION=="add|change", SUBSYSTEM=="block", ENV{MAJOR}=="'$ROOT_MAJOR'", ENV{MINOR}=="'$ROOT_MINOR'", SYMLINK+="root"' > $RULESDIR/61-dev-root-link.rules
-}
-
-populate_dev()
-{
-	if yesno ${rc_dev_root_symlink:-yes}; then
-		ebegin "Generating a rule to create a /dev/root symlink"
-		dev_root_link
-		eend $?
-	fi
-
-	get_bootparam "nocoldplug" && rc_coldplug="no"
-	if ! yesno ${rc_coldplug:-${RC_COLDPLUG:-yes}}; then
-		einfo "Setting /dev permissions and symbolic links"
-		udevadm trigger --attr-match=dev --action=add
-		udevadm trigger --subsystem-match=net --action=add
-		ewarn "Skipping udev coldplug sequence"
-		return 0
-	fi
-
-	ebegin "Populating /dev with existing devices through uevents"
-	udevadm trigger --type=subsystems --action=add
-	udevadm trigger --type=devices --action=add
-	eend $?
-
-	ebegin "Waiting for uevents to be processed"
-	udevadm settle --timeout=${udev_settle_timeout:-60}
-	eend $?
-	return 0
-}
-
-stop_udevmonitor()
-{
-	yesno "${udev_monitor:-no}" || return 0
-
-	if yesno "${udev_monitor_keep_running:-no}"; then
-		ewarn "udev: udevmonitor is still running and writing into ${udevmonitor_log}"
-	else
-		einfo "udev: Stopping udevmonitor: Log is in ${udevmonitor_log}"
-		start-stop-daemon --stop --pidfile "${udevmonitor_pid}" --exec /bin/udevadm
-	fi
-}
-
-display_hotplugged_services()
-{
-	local svcfile= svc= services=
-	for svcfile in "${RC_SVCDIR}"/hotplugged/*; do
-		svc="${svcfile##*/}"
-		[ -x "${svcfile}" ] || continue
-
-		services="${services} ${svc}"
-	done
-	[ -n "${services}" ] && einfo "Device initiated services:${HILITE}${services}${NORMAL}"
-}
-
-start_post()
-{
-	start_udevmonitor
-	populate_dev
-	stop_udevmonitor
-	display_hotplugged_services
-	return 0
-}
-
 stop()
 {
 	local rc=0

diff --git a/init.d/udev-settle b/init.d/udev-settle
new file mode 100644
index 0000000..dd3fe4b
--- /dev/null
+++ b/init.d/udev-settle
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+# Copyright 2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend()
+{
+need udev
+after udev-trigger
+	keyword -vserver -lxc
+}
+
+start()
+{
+	ebegin "Waiting for uevents to be processed"
+	udevadm settle --timeout=${udev_settle_timeout:-60}
+	eend $?
+}

diff --git a/init.d/udev-trigger b/init.d/udev-trigger
new file mode 100644
index 0000000..abc4540
--- /dev/null
+++ b/init.d/udev-trigger
@@ -0,0 +1,91 @@
+#!/sbin/openrc-run
+# Copyright 2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="udev Coldplug all Devices"
+
+udevmonitor_log=/run/udevmonitor.log
+udevmonitor_pid=/run/udevmonitor.pid
+
+depend()
+{
+	need udev
+	provide dev
+	keyword -vserver -lxc
+}
+
+start_pre()
+{
+	if yesno "${udev_monitor:-no}"; then
+		einfo "Running udevadm monitor ${udev_monitor_opts} to log all events"
+		start-stop-daemon --start --stdout "${udevmonitor_log}" \
+			--make-pidfile --pidfile "${udevmonitor_pid}" \
+			--background --exec /bin/udevadm -- monitor ${udev_monitor_opts}
+	fi
+}
+
+display_hotplugged_services()
+{
+	local svcfile= svc= services=
+	for svcfile in "${RC_SVCDIR}"/hotplugged/*; do
+		svc="${svcfile##*/}"
+		[ -x "${svcfile}" ] || continue
+
+		services="${services} ${svc}"
+	done
+	[ -n "${services}" ] && einfo "Device initiated services:${HILITE}${services}${NORMAL}"
+}
+
+start_post()
+{
+	if yesno "${udev_monitor}:-no}"; then
+		if yesno "${udev_monitor_keep_running:-no}"; then
+			ewarn "udevmonitor is still writing into ${udevmonitor_log}"
+		else
+			einfo "Stopping udevmonitor: Log is in ${udevmonitor_log}"
+			start-stop-daemon --stop --pidfile "${udevmonitor_pid}" \
+				--exec /bin/udevadm
+		fi
+		fi
+		display_hotplugged_services
+}
+
+# This is here because some software expects /dev/root to exist.
+# For more information, see this bug:
+# https://bugs.gentoo.org/show_bug.cgi?id=438380
+dev_root_link()
+{
+	local RULESDIR=/run/udev/rules.d
+	[ -d $RULESDIR ] || mkdir -p $RULESDIR
+	eval $(udevadm info --export --export-prefix=ROOT_ --device-id-of-file=/ ||
+		true)
+	[ "$ROOT_MAJOR" -a "$ROOT_MINOR" ] || return 0
+
+	# btrfs filesystems have bogus major/minor numbers
+	[ "$ROOT_MAJOR" != 0 ] || return 0
+
+	echo 'ACTION=="add|change", SUBSYSTEM=="block", ENV{MAJOR}=="'$ROOT_MAJOR'", ENV{MINOR}=="'$ROOT_MINOR'", SYMLINK+="root"' > $RULESDIR/61-dev-root-link.rules
+}
+
+start()
+{
+	if yesno ${rc_dev_root_symlink:-yes}; then
+		ebegin "Generating a rule to create a /dev/root symlink"
+		dev_root_link
+		eend $?
+	fi
+
+	get_bootparam "nocoldplug" && rc_coldplug="no"
+	if ! yesno ${rc_coldplug:-${RC_COLDPLUG:-yes}}; then
+		einfo "Setting /dev permissions and symbolic links"
+		udevadm trigger --attr-match=dev --action=add
+		udevadm trigger --subsystem-match=net --action=add
+		ewarn "Skipping udev coldplug sequence"
+		return 0
+	fi
+
+	ebegin "Populating /dev with existing devices through uevents"
+	udevadm trigger --type=subsystems --action=add
+	udevadm trigger --type=devices --action=add
+	eend $?
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/, conf.d/
@ 2012-07-31 22:54 William Hubbs
  0 siblings, 0 replies; 7+ messages in thread
From: William Hubbs @ 2012-07-31 22:54 UTC (permalink / raw
  To: gentoo-commits

commit:     bdb566aef830bd7d9f6a346b45590c371c81d6cf
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 31 22:36:44 2012 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Jul 31 22:36:44 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/udev-gentoo-scripts.git;a=commit;h=bdb566ae

always wait for uevents

I was advised by upstream that we always need to wait for uevents, so
make the wait mandatory.

---
 conf.d/udev |    4 ----
 init.d/udev |    9 +++------
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/conf.d/udev b/conf.d/udev
index 921d86b..667cc8b 100644
--- a/conf.d/udev
+++ b/conf.d/udev
@@ -13,10 +13,6 @@
 
 # Expert options:
 
-# Should we wait for all uevents to be processed at boot?
-# Most of the time, this should not need to be changed.
-#udev_settle_wait="NO"
-
 # Timeout in seconds to wait for processing of uevents at boot.
 # There should be no need to change this.
 #udev_settle_timeout="60"

diff --git a/init.d/udev b/init.d/udev
index 4985d5d..33b0335 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -10,7 +10,6 @@ rc_coldplug=${rc_coldplug:-${RC_COLDPLUG:-YES}}
 udev_debug="${udev_debug:-no}"
 udev_monitor="${udev_monitor:-no}"
 udev_monitor_keep_running="${udev_monitor_keep_running:-no}"
-udev_settle_wait="${udev_settle_wait:-NO}"
 udev_settle_timeout="${udev_settle_timeout:-60}"
 kv_min="${kv_min:-2.6.34}"
 
@@ -138,11 +137,9 @@ populate_dev()
 	udevadm trigger --type=subsystems --action=add
 	udevadm trigger --type=devices --action=add
 	eend $?
-	if yesno "${udev_settle_wait}"; then
-		ebegin "Waiting for uevents to be processed"
-		udevadm settle --timeout=${udev_settle_timeout}
-		eend $?
-	fi
+	ebegin "Waiting for uevents to be processed"
+	udevadm settle --timeout=${udev_settle_timeout}
+	eend $?
 	udevadm control --property=do_not_run_plug_service=
 	return 0
 }


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/, conf.d/
@ 2012-07-31 17:35 William Hubbs
  0 siblings, 0 replies; 7+ messages in thread
From: William Hubbs @ 2012-07-31 17:35 UTC (permalink / raw
  To: gentoo-commits

commit:     408660f945441f0978e6415de131530c7d384070
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 31 16:52:11 2012 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Jul 31 17:35:24 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/udev-gentoo-scripts.git;a=commit;h=408660f9

Allow an optional wait for uevent processing

Systemd allows the wait for uevents during boot to be optional, so we
should do the same.

---
 conf.d/udev |    8 ++++++++
 init.d/udev |    7 ++++++-
 2 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/conf.d/udev b/conf.d/udev
index 1dfdc79..921d86b 100644
--- a/conf.d/udev
+++ b/conf.d/udev
@@ -13,6 +13,14 @@
 
 # Expert options:
 
+# Should we wait for all uevents to be processed at boot?
+# Most of the time, this should not need to be changed.
+#udev_settle_wait="NO"
+
+# Timeout in seconds to wait for processing of uevents at boot.
+# There should be no need to change this.
+#udev_settle_timeout="60"
+
 # Add extra command line options to udevd, use with care
 # udevd --help for possible values
 #udev_opts=""

diff --git a/init.d/udev b/init.d/udev
index 20b52d9..4985d5d 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -10,6 +10,7 @@ rc_coldplug=${rc_coldplug:-${RC_COLDPLUG:-YES}}
 udev_debug="${udev_debug:-no}"
 udev_monitor="${udev_monitor:-no}"
 udev_monitor_keep_running="${udev_monitor_keep_running:-no}"
+udev_settle_wait="${udev_settle_wait:-NO}"
 udev_settle_timeout="${udev_settle_timeout:-60}"
 kv_min="${kv_min:-2.6.34}"
 
@@ -137,7 +138,11 @@ populate_dev()
 	udevadm trigger --type=subsystems --action=add
 	udevadm trigger --type=devices --action=add
 	eend $?
-
+	if yesno "${udev_settle_wait}"; then
+		ebegin "Waiting for uevents to be processed"
+		udevadm settle --timeout=${udev_settle_timeout}
+		eend $?
+	fi
 	udevadm control --property=do_not_run_plug_service=
 	return 0
 }


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/, conf.d/
@ 2012-07-16 15:30 William Hubbs
  0 siblings, 0 replies; 7+ messages in thread
From: William Hubbs @ 2012-07-16 15:30 UTC (permalink / raw
  To: gentoo-commits

commit:     e015ab3fad7daa40a1d463af7ef5e69d34583cca
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 16 14:54:31 2012 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Jul 16 14:54:31 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/udev-gentoo-scripts.git;a=commit;h=e015ab3f

udev: remove code that waits for uevents to process

According to discussions I have seen on the #udev irc channel, this
should no longer be necessary.

---
 conf.d/udev |    4 ----
 init.d/udev |    9 ---------
 2 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/conf.d/udev b/conf.d/udev
index 667cc8b..1dfdc79 100644
--- a/conf.d/udev
+++ b/conf.d/udev
@@ -13,10 +13,6 @@
 
 # Expert options:
 
-# Timeout in seconds to wait for processing of uevents at boot.
-# There should be no need to change this.
-#udev_settle_timeout="60"
-
 # Add extra command line options to udevd, use with care
 # udevd --help for possible values
 #udev_opts=""

diff --git a/init.d/udev b/init.d/udev
index 9e8ff76..20b52d9 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -138,15 +138,6 @@ populate_dev()
 	udevadm trigger --type=devices --action=add
 	eend $?
 
-	# 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}
-	eend $?
-
 	udevadm control --property=do_not_run_plug_service=
 	return 0
 }



^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/, conf.d/
@ 2012-06-30 23:47 William Hubbs
  0 siblings, 0 replies; 7+ messages in thread
From: William Hubbs @ 2012-06-30 23:47 UTC (permalink / raw
  To: gentoo-commits

commit:     7084a91b1ec84af5173597b41b3ed899996bf9c8
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 30 23:06:33 2012 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sat Jun 30 23:28:39 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/udev-gentoo-scripts.git;a=commit;h=7084a91b

drop support for the persistent rules generators

For udev 185 and newer, this is not supported by upstream, so we
can remove the code from the startup script.

---
 conf.d/udev |   11 ----------
 init.d/udev |   61 -----------------------------------------------------------
 2 files changed, 0 insertions(+), 72 deletions(-)

diff --git a/conf.d/udev b/conf.d/udev
index 12c2afa..3c425b3 100644
--- a/conf.d/udev
+++ b/conf.d/udev
@@ -1,16 +1,5 @@
 # /etc/conf.d/udev: config file for udev
 
-# We discourage to disable persistent-net!!
-# this may lead to random interface naming
-
-# Disable adding new rules for persistent-net
-persistent_net_disable="no"
-
-# Disable adding new rules for persistent-cd
-# Disabling this will stop new cdrom devices to appear
-# as /dev/{cdrom,cdrw,dvd,dvdrw}
-persistent_cd_disable="no"
-
 # udev can trigger coldplug events which cause services to start and
 # kernel modules to be loaded.
 # Services are deferred to start in the boot runlevel.

diff --git a/init.d/udev b/init.d/udev
index 265523a..2adee63 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -6,8 +6,6 @@ command=/usr/lib/systemd/systemd-udevd
 command_args="--daemon ${udev_opts}"
 description="udev manages device permissions and symbolic links in /dev"
 
-persistent_cd_disable="${persistent_cd_disable:-no}"
-persistent_net_disable="${persistent_net_disable:-no}"
 rc_coldplug=${rc_coldplug:-${RC_COLDPLUG:-YES}}
 udev_debug="${udev_debug:-no}"
 udev_monitor="${udev_monitor:-no}"
@@ -81,21 +79,6 @@ cleanup()
 	exit 1
 }
 
-rules_disable_switch()
-{
-	# this function disables rules files
-	# by creating new files with the same name
-	# in a temp rules directory with higher priority
-	local f=$(get_rundir)/rules.d/"$1" bname="$1" onoff="$2"
-
-	if yesno "${onoff}"; then
-		echo "# This file disables ${bname} due to /etc/conf.d/udev" \
-			> "${f}"
-	else
-		rm -f "${f}"
-	fi
-}
-
 is_service_enabled()
 {
 	local svc="$1"
@@ -127,9 +110,6 @@ start_pre()
 
 	/lib/udev/write_root_link_rule
 
-	rules_disable_switch 75-persistent-net-generator.rules "${persistent_net_disable}"
-	rules_disable_switch 75-cd-aliases-generator.rules ${persistent_cd_disable}
-	
 	if [ -e /proc/sys/kernel/hotplug ]; then
 		echo "" >/proc/sys/kernel/hotplug
 	fi
@@ -189,46 +169,6 @@ populate_dev()
 	return 0
 }
 
-check_persistent_net()
-{
-	# check if there are problems with persistent-net
-	local syspath= devs= problem=false
-	for syspath in /sys/class/net/*_rename*; do
-		if [ -d "${syspath}" ]; then
-			devs="${devs} ${syspath##*/}"
-			problem=true
-		fi
-	done
-
-	${problem} || return 0
-
-	eerror "UDEV: Your system has a problem assigning persistent names"
-	eerror "to these network interfaces: ${devs}"
-
-	einfo "Checking persistent-net rules:"
-	# the sed-expression lists all duplicate lines
-	# from the input, like "uniq -d" does, but uniq
-	# is installed into /usr/bin and not available at boot.
-	dups=$(
-	RULES_FILE='/etc/udev/rules.d/70-persistent-net.rules'
-	. /lib/udev/rule_generator.functions
-	find_all_rules 'NAME=' '.*' | \
-	tr ' ' '\n' | \
-	sort | \
-	sed '$!N; s/^\(.*\)\n\1$/\1/; t; D'
-	)
-	if [ -n "${dups}" ]; then
-		ewarn "The rules create multiple entries assigning these names:"
-		eindent
-		ewarn "${dups}"
-		eoutdent
-	else
-		ewarn "Found no duplicate names in persistent-net rules,"
-		ewarn "there must be some other problem!"
-	fi
-	return 1
-}
-
 check_udev_works()
 {
 	# should exist on every system, else udev failed
@@ -267,7 +207,6 @@ start_post()
 {
 	start_udevmonitor
 	populate_dev
-	check_persistent_net
 	check_udev_works || cleanup
 	stop_udevmonitor
 	display_hotplugged_services



^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/, conf.d/
@ 2011-08-03 20:18 William Hubbs
  0 siblings, 0 replies; 7+ messages in thread
From: William Hubbs @ 2011-08-03 20:18 UTC (permalink / raw
  To: gentoo-commits

commit:     c322c9fb2fa5baf5706dfd771a41b6868b0e047a
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  3 20:17:44 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Aug  3 20:17:44 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/udev-gentoo-scripts.git;a=commit;h=c322c9fb

Revert "Move debug and event logs"

This reverts commit 9177f931b926e4b1377b51f19cbbae94a421fc03.

This can't happen because root is read only when udev is started.

---
 conf.d/udev |    4 ++--
 init.d/udev |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/conf.d/udev b/conf.d/udev
index f41ff01..da113a8 100644
--- a/conf.d/udev
+++ b/conf.d/udev
@@ -38,12 +38,12 @@ persistent_cd_disable="no"
 # udevd --help for possible values
 #udev_opts=""
 
-# Run udevd --debug and write output to /tmp/udev.log
+# Run udevd --debug and write output to $RUNDIR/udev.log
 # Should not be kept on as it fills diskspace slowly
 #udev_debug="YES"
 
 # Run udevadmin monitor to get a log of all events
-# in /tmp/udevmonitor.log
+# in $RUNDIR/udevmonitor.log
 #udev_monitor="YES"
 
 # Keep udevmonitor running after populating /dev.

diff --git a/init.d/udev b/init.d/udev
index a565ac0..9e6e2e7 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -103,7 +103,7 @@ start_udevd()
 
 	ebegin "Starting udevd"
 	if yesno "${udev_debug}"; then
-		/sbin/udevd --daemon ${opts} --debug 2>/tmp/udev.log
+		/sbin/udevd --daemon ${opts} --debug 2>"$(get_rundir)"/udev.log
 	else
 		start-stop-daemon --start --exec /sbin/udevd -- --daemon ${opts}
 	fi
@@ -146,10 +146,10 @@ start_udevmonitor()
 {
 	yesno "${udev_monitor}" || return 0
 
-	udevmonitor_log=/tmp/udevmonitor.log
+	udevmonitor_log="$(get_rundir)/udevmonitor.log"
 	udevmonitor_pid="$(get_rundir)/udevmonitor.pid"
 
-	einfo "udev: Running udevadm monitor ${udev_monitor_opts} to log all events"
+	einfo "udev: Running udevadm monitor ${udev_monitor_opts} to get a log of all events"
 	start-stop-daemon --start --stdout "${udevmonitor_log}" \
 		--make-pidfile --pidfile "${udevmonitor_pid}" \
 		--background --exec /sbin/udevadm -- monitor ${udev_monitor_opts}



^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/, conf.d/
@ 2011-08-03 18:59 William Hubbs
  0 siblings, 0 replies; 7+ messages in thread
From: William Hubbs @ 2011-08-03 18:59 UTC (permalink / raw
  To: gentoo-commits

commit:     9177f931b926e4b1377b51f19cbbae94a421fc03
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  3 18:55:48 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Aug  3 18:55:48 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/udev-gentoo-scripts.git;a=commit;h=9177f931

Move debug and event logs

Our debug and event logs were formerly stored in udev's runtime
directory. I feel that /tmp is a better place for these, so this commit
makes that change.

---
 conf.d/udev |    4 ++--
 init.d/udev |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/conf.d/udev b/conf.d/udev
index da113a8..f41ff01 100644
--- a/conf.d/udev
+++ b/conf.d/udev
@@ -38,12 +38,12 @@ persistent_cd_disable="no"
 # udevd --help for possible values
 #udev_opts=""
 
-# Run udevd --debug and write output to $RUNDIR/udev.log
+# Run udevd --debug and write output to /tmp/udev.log
 # Should not be kept on as it fills diskspace slowly
 #udev_debug="YES"
 
 # Run udevadmin monitor to get a log of all events
-# in $RUNDIR/udevmonitor.log
+# in /tmp/udevmonitor.log
 #udev_monitor="YES"
 
 # Keep udevmonitor running after populating /dev.

diff --git a/init.d/udev b/init.d/udev
index 9e6e2e7..a565ac0 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -103,7 +103,7 @@ start_udevd()
 
 	ebegin "Starting udevd"
 	if yesno "${udev_debug}"; then
-		/sbin/udevd --daemon ${opts} --debug 2>"$(get_rundir)"/udev.log
+		/sbin/udevd --daemon ${opts} --debug 2>/tmp/udev.log
 	else
 		start-stop-daemon --start --exec /sbin/udevd -- --daemon ${opts}
 	fi
@@ -146,10 +146,10 @@ start_udevmonitor()
 {
 	yesno "${udev_monitor}" || return 0
 
-	udevmonitor_log="$(get_rundir)/udevmonitor.log"
+	udevmonitor_log=/tmp/udevmonitor.log
 	udevmonitor_pid="$(get_rundir)/udevmonitor.pid"
 
-	einfo "udev: Running udevadm monitor ${udev_monitor_opts} to get a log of all events"
+	einfo "udev: Running udevadm monitor ${udev_monitor_opts} to log all events"
 	start-stop-daemon --start --stdout "${udevmonitor_log}" \
 		--make-pidfile --pidfile "${udevmonitor_pid}" \
 		--background --exec /sbin/udevadm -- monitor ${udev_monitor_opts}



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

end of thread, other threads:[~2014-11-25 20:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-25 20:58 [gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/, conf.d/ William Hubbs
  -- strict thread matches above, loose matches on Subject: below --
2012-07-31 22:54 William Hubbs
2012-07-31 17:35 William Hubbs
2012-07-16 15:30 William Hubbs
2012-06-30 23:47 William Hubbs
2011-08-03 20:18 William Hubbs
2011-08-03 18:59 William Hubbs

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