[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2021-08-29 Thread William Hubbs
commit: 93777e58b134935a485214e4f13dce2f2cebb800
Author: Mike Gilbert  gentoo  org>
AuthorDate: Sun Aug 29 16:41:40 2021 +
Commit: William Hubbs  gentoo  org>
CommitDate: Sun Aug 29 18:38:33 2021 +
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=93777e58

udev: unlink control socket after stopping udevd

Closes: https://bugs.gentoo.org/810928
Signed-off-by: Mike Gilbert  gentoo.org>
Signed-off-by: William Hubbs  gentoo.org>

 init.d/udev | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/init.d/udev b/init.d/udev
index 705d87c..724cb82 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -77,9 +77,9 @@ stop() {
get_udevd_binary || return 1
ebegin "Stopping ${name:-$RC_SVCNAME}"
udevadm control --exit ||
-   start-stop-daemon --stop --exec "${command}" --pidfile 
"${pidfile}" &&
-   rm -f "${pidfile}"
+   start-stop-daemon --stop --exec "${command}" --pidfile 
"${pidfile}"
eend $? "Failed to stop $RC_SVCNAME"
+   [ $? -eq 0 ] && rm -f "${pidfile}" /run/udev/control
 }
 
 reload() {



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2021-05-24 Thread William Hubbs
commit: 9ce321d30bed9f952018f5bb63b3c8a3aebcd4ba
Author: William Hubbs  gentoo  org>
AuthorDate: Mon May 24 22:51:21 2021 +
Commit: William Hubbs  gentoo  org>
CommitDate: Mon May 24 22:51:33 2021 +
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=9ce321d3

fix --debug option

Thanks to nissarin  gmail.com for the patch

Closes: https://bugs.gentoo.org/751973
Signed-off-by: William Hubbs  gentoo.org>

 init.d/udev | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/init.d/udev b/init.d/udev
index c7b8ade..705d87c 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -66,7 +66,8 @@ start_pre() {
fi
 
if yesno "${udev_debug:-NO}"; then
-   command_args="${command_args} --debug 2> /run/udevdebug.log"
+   command_args="${command_args} --debug"
+   error_log="/run/udevdebug.log"
fi
 
return 0



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2021-05-22 Thread William Hubbs
commit: 5f1ce4853b7f14883478608d8af1ce651aa076df
Author: William Hubbs  gentoo  org>
AuthorDate: Sat May 22 18:48:27 2021 +
Commit: William Hubbs  gentoo  org>
CommitDate: Sat May 22 18:48:27 2021 +
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=5f1ce485

use -containers keyword to cover all containers

Signed-off-by: William Hubbs  gentoo.org>

 init.d/udev | 2 +-
 init.d/udev-settle  | 2 +-
 init.d/udev-trigger | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/init.d/udev b/init.d/udev
index 6446344..c7b8ade 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -12,7 +12,7 @@ description_reload="Reload the udev rules and databases"
 depend() {
need sysfs dev-mount
before checkfs fsck
-   keyword -lxc -systemd-nspawn -vserver
+   keyword -containers
 }
 
 get_udevd_binary() {

diff --git a/init.d/udev-settle b/init.d/udev-settle
index a5ceb93..9d661a4 100644
--- a/init.d/udev-settle
+++ b/init.d/udev-settle
@@ -6,7 +6,7 @@ depend() {
need udev
after udev-trigger
provide dev-settle
-   keyword -lxc -systemd-nspawn -vserver
+   keyword -containers
 }
 
 start() {

diff --git a/init.d/udev-trigger b/init.d/udev-trigger
index dfca873..9a0c7cc 100644
--- a/init.d/udev-trigger
+++ b/init.d/udev-trigger
@@ -10,7 +10,7 @@ udevmonitor_pid=/run/udevmonitor.pid
 depend() {
need udev
provide dev
-   keyword -lxc -systemd-nspawn -vserver
+   keyword -containers
 }
 
 start_pre() {



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2020-08-05 Thread William Hubbs
commit: e1c5bed2a1581db97f3912eba2ae98a1122388df
Author: Kaarle Ritvanen  datakunkku  fi>
AuthorDate: Sat Apr 11 18:08:42 2020 +
Commit: William Hubbs  gentoo  org>
CommitDate: Wed Aug  5 16:13:10 2020 +
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=e1c5bed2

udev-settle: fix timeout argument quoting

empty value resulted in "Extraneous argument" error

Signed-off-by: William Hubbs  gentoo.org>

 init.d/udev-settle | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init.d/udev-settle b/init.d/udev-settle
index f6e0707..a5ceb93 100644
--- a/init.d/udev-settle
+++ b/init.d/udev-settle
@@ -12,6 +12,6 @@ depend() {
 start() {
ebegin "Waiting for uevents to be processed"
udevadm settle \
-   ${udev_settle_timeout:+--timeout=}"${udev_settle_timeout}"
+   ${udev_settle_timeout:+--timeout="${udev_settle_timeout}"}
eend $?
 }



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2020-08-05 Thread William Hubbs
commit: 99de14a98649cf119ce220dd1c9fba58b98cb3b2
Author: Mike Gilbert  gentoo  org>
AuthorDate: Tue Aug  4 19:31:16 2020 +
Commit: William Hubbs  gentoo  org>
CommitDate: Wed Aug  5 16:12:22 2020 +
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=99de14a9

Allow udevd to be a symlink

As of systemd-246, systemd-udevd is a symlink to udevadm.

Bug: https://bugs.gentoo.org/734950
Reverts: b165050513894b3d600e8302bd68c7ba553fbb04
Signed-off-by: William Hubbs  gentoo.org>

 init.d/udev | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init.d/udev b/init.d/udev
index 4e618ca..6446344 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -19,7 +19,7 @@ get_udevd_binary() {
local bins
bins="/sbin/udevd /lib/systemd/systemd-udevd 
/usr/lib/systemd/systemd-udevd"
for f in ${bins}; do
-   if [ -x "$f" ] && [ ! -L "$f" ]; then
+   if [ -x "$f" ]; then
command="$f"
fi
done



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2019-11-30 Thread William Hubbs
commit: ddf1a5a7733b3b4fc5df0fa6f5de70164f080575
Author: William Hubbs  gentoo  org>
AuthorDate: Sat Nov 30 20:58:52 2019 +
Commit: William Hubbs  gentoo  org>
CommitDate: Sat Nov 30 21:26:37 2019 +
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=ddf1a5a7

init.d/udev: remove the RC variable from the stop function

Signed-off-by: William Hubbs  gentoo.org>

 init.d/udev | 17 +
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/init.d/udev b/init.d/udev
index 6aea5a5..4e618ca 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -73,19 +73,12 @@ start_pre() {
 }
 
 stop() {
-   local rc
-   rc=0
+   get_udevd_binary || return 1
ebegin "Stopping ${name:-$RC_SVCNAME}"
-   udevadm control --exit
-   rc=$?
-   if [ $rc -ne 0 ]; then
-   eend $rc "Failed to stop $RC_SVCNAME using udevadm"
-   ebegin "Trying with start-stop-daemon"
-   start-stop-daemon --stop --pidfile "${pidfile}"
-   rc=$?
-   fi
-   [ $rc -eq 0 ] && rm -f "${pidfile}"
-   eend $rc "Failed to stop $RC_SVCNAME"
+   udevadm control --exit ||
+   start-stop-daemon --stop --exec "${command}" --pidfile 
"${pidfile}" &&
+   rm -f "${pidfile}"
+   eend $? "Failed to stop $RC_SVCNAME"
 }
 
 reload() {



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2019-11-30 Thread William Hubbs
commit: efdd416d20966196cf0ac8dd3231c5919b984ae8
Author: William Hubbs  gentoo  org>
AuthorDate: Sat Nov 30 20:07:34 2019 +
Commit: William Hubbs  gentoo  org>
CommitDate: Sat Nov 30 20:07:44 2019 +
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=efdd416d

init.d: style fixes

Signed-off-by: William Hubbs  gentoo.org>

 init.d/udev | 20 +---
 init.d/udev-settle  |  8 +++-
 init.d/udev-trigger | 23 +--
 3 files changed, 21 insertions(+), 30 deletions(-)

diff --git a/init.d/udev b/init.d/udev
index d0f9d61..6aea5a5 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -9,17 +9,17 @@ description="udev manages device permissions and symbolic 
links in /dev"
 extra_started_commands="reload"
 description_reload="Reload the udev rules and databases"
 
-depend()
-{
+depend() {
need sysfs dev-mount
before checkfs fsck
keyword -lxc -systemd-nspawn -vserver
 }
 
 get_udevd_binary() {
-   local bins="/sbin/udevd /lib/systemd/systemd-udevd 
/usr/lib/systemd/systemd-udevd"
+   local bins
+   bins="/sbin/udevd /lib/systemd/systemd-udevd 
/usr/lib/systemd/systemd-udevd"
for f in ${bins}; do
-   if [ -x "$f" -a ! -L "$f" ]; then
+   if [ -x "$f" ] && [ ! -L "$f" ]; then
command="$f"
fi
done
@@ -29,8 +29,7 @@ get_udevd_binary() {
fi
 }
 
-start_pre()
-{
+start_pre() {
# make sure devtmpfs is in the kernel
if ! grep -qs devtmpfs /proc/filesystems; then
eerror "CONFIG_DEVTMPFS=y is required in your kernel 
configuration"
@@ -73,9 +72,9 @@ start_pre()
return 0
 }
 
-stop()
-{
-   local rc=0
+stop() {
+   local rc
+   rc=0
ebegin "Stopping ${name:-$RC_SVCNAME}"
udevadm control --exit
rc=$?
@@ -89,8 +88,7 @@ stop()
eend $rc "Failed to stop $RC_SVCNAME"
 }
 
-reload()
-{
+reload() {
ebegin "reloading udev rules and databases"
udevadm control --reload
eend $?

diff --git a/init.d/udev-settle b/init.d/udev-settle
index c495769..f6e0707 100644
--- a/init.d/udev-settle
+++ b/init.d/udev-settle
@@ -2,18 +2,16 @@
 # Copyright 2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-depend()
-{
+depend() {
need udev
after udev-trigger
provide dev-settle
keyword -lxc -systemd-nspawn -vserver
 }
 
-start()
-{
+start() {
ebegin "Waiting for uevents to be processed"
udevadm settle \
-   ${udev_settle_timeout:+--timeout=}$udev_settle_timeout
+   ${udev_settle_timeout:+--timeout=}"${udev_settle_timeout}"
eend $?
 }

diff --git a/init.d/udev-trigger b/init.d/udev-trigger
index bdd4884..dfca873 100644
--- a/init.d/udev-trigger
+++ b/init.d/udev-trigger
@@ -7,15 +7,13 @@ description="udev Coldplug all Devices"
 udevmonitor_log=/run/udevmonitor.log
 udevmonitor_pid=/run/udevmonitor.pid
 
-depend()
-{
+depend() {
need udev
provide dev
keyword -lxc -systemd-nspawn -vserver
 }
 
-start_pre()
-{
+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}" \
@@ -25,9 +23,8 @@ start_pre()
return 0
 }
 
-display_hotplugged_services()
-{
-   local svcfile= svc= services=
+display_hotplugged_services() {
+   local svcfile svc services
for svcfile in "${RC_SVCDIR}"/hotplugged/*; do
svc="${svcfile##*/}"
[ -x "${svcfile}" ] || continue
@@ -38,8 +35,7 @@ display_hotplugged_services()
return 0
 }
 
-start_post()
-{
+start_post() {
if yesno "${udev_monitor:-no}"; then
if yesno "${udev_monitor_keep_running:-no}"; then
ewarn "udevmonitor is still writing into 
${udevmonitor_log}"
@@ -56,9 +52,9 @@ start_post()
 # 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
+dev_root_link() {
+   local RULESDIR
+   RULESDIR=/run/udev/rules.d
[ -d $RULESDIR ] || mkdir -p $RULESDIR
eval $(udevadm info --export --export-prefix=ROOT_ 
--device-id-of-file=/ ||
true)
@@ -71,8 +67,7 @@ dev_root_link()
return 0
 }
 
-start()
-{
+start() {
if yesno ${rc_dev_root_symlink:-yes}; then
ebegin "Generating a rule to create a /dev/root symlink"
dev_root_link



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2019-02-20 Thread William Hubbs
commit: 6f98cf89f54a9ad1c9625577d100f6ca8b8a2b0b
Author: William Hubbs  gentoo  org>
AuthorDate: Wed Feb 20 16:53:59 2019 +
Commit: William Hubbs  gentoo  org>
CommitDate: Wed Feb 20 17:07:30 2019 +
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=6f98cf89

Do not use the --daemon option in the udev service script

Using this option does not allow OpenRC to show the status correctly
since udevd doesn't write a pid file.
We need to create the pidfile ourselves.

Signed-off-by: William Hubbs  gentoo.org>

 init.d/udev | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/init.d/udev b/init.d/udev
index 6ff21b2..d0f9d61 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -2,7 +2,9 @@
 # Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-command_args="--daemon ${udev_opts}"
+command_args="${udev_opts}"
+command_background=yes
+pidfile=/run/udev.pid
 description="udev manages device permissions and symbolic links in /dev"
 extra_started_commands="reload"
 description_reload="Reload the udev rules and databases"
@@ -79,11 +81,11 @@ stop()
rc=$?
if [ $rc -ne 0 ]; then
eend $rc "Failed to stop $RC_SVCNAME using udevadm"
-   get_udevd_binary || return 1
ebegin "Trying with start-stop-daemon"
-   start-stop-daemon --stop --exec ${command}
+   start-stop-daemon --stop --pidfile "${pidfile}"
rc=$?
fi
+   [ $rc -eq 0 ] && rm -f "${pidfile}"
eend $rc "Failed to stop $RC_SVCNAME"
 }
 



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2016-11-10 Thread William Hubbs
commit: 413b37eb25f384129326b033de369be4b725c7e0
Author: William Hubbs  gmail  com>
AuthorDate: Thu Nov 10 17:14:39 2016 +
Commit: William Hubbs  gentoo  org>
CommitDate: Thu Nov 10 17:14:54 2016 +
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=413b37eb

udev-trigger: allow failure if udevadm exits with non-zero status

 init.d/udev-trigger | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/init.d/udev-trigger b/init.d/udev-trigger
index 0f69455..bdd4884 100644
--- a/init.d/udev-trigger
+++ b/init.d/udev-trigger
@@ -84,13 +84,13 @@ start()
einfo "Setting /dev permissions and symbolic links"
udevadm trigger --attr-match=dev --action=add
udevadm trigger --subsystem-match=net --action=add
+   rc=$?
ewarn "Skipping udev coldplug sequence"
-   return 0
+   return $rc
fi
 
ebegin "Populating /dev with existing devices through uevents"
udevadm trigger --type=subsystems --action=add
udevadm trigger --type=devices --action=add
eend $?
-   return 0
 }



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2016-11-10 Thread William Hubbs
commit: c292c648516682bc3456c66f6e6dbb9ff4ba52c5
Author: William Hubbs  gmail  com>
AuthorDate: Thu Nov 10 16:39:29 2016 +
Commit: William Hubbs  gentoo  org>
CommitDate: Thu Nov 10 16:39:29 2016 +
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=c292c648

init.d/udev-settle: typo fix

 init.d/udev-settle | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init.d/udev-settle b/init.d/udev-settle
index 1a73105..c495769 100644
--- a/init.d/udev-settle
+++ b/init.d/udev-settle
@@ -14,6 +14,6 @@ start()
 {
ebegin "Waiting for uevents to be processed"
udevadm settle \
-   ${udev_settle_timeout:+--timeout}=$udev_settle_timeout
+   ${udev_settle_timeout:+--timeout=}$udev_settle_timeout
eend $?
 }



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2016-11-09 Thread William Hubbs
commit: 0cc7d1bac0426a0ac5e03fbab66b9256e6bd3787
Author: William Hubbs  gmail  com>
AuthorDate: Wed Nov  9 20:31:20 2016 +
Commit: William Hubbs  gentoo  org>
CommitDate: Wed Nov  9 20:31:20 2016 +
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=0cc7d1ba

init.d/udev-settle: allow service to fail if udevadm fails

 init.d/udev-settle | 1 -
 1 file changed, 1 deletion(-)

diff --git a/init.d/udev-settle b/init.d/udev-settle
index e439a1d..93907f6 100644
--- a/init.d/udev-settle
+++ b/init.d/udev-settle
@@ -15,5 +15,4 @@ start()
ebegin "Waiting for uevents to be processed"
udevadm settle --timeout=${udev_settle_timeout:-60}
eend $?
-   return 0
 }



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2016-06-01 Thread William Hubbs
commit: e785e907373017c01048d5edef05594c0f072390
Author: William Hubbs  gmail  com>
AuthorDate: Tue May 31 21:12:19 2016 +
Commit: William Hubbs  gentoo  org>
CommitDate: Wed Jun  1 21:17:39 2016 +
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=e785e907

udev-settle: fix indentation

 init.d/udev-settle | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/init.d/udev-settle b/init.d/udev-settle
index cc87a39..e439a1d 100644
--- a/init.d/udev-settle
+++ b/init.d/udev-settle
@@ -4,9 +4,9 @@
 
 depend()
 {
-need udev
-after udev-trigger
-provide dev-settle
+   need udev
+   after udev-trigger
+   provide dev-settle
keyword -lxc -systemd-nspawn -vserver
 }
 



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2016-05-31 Thread William Hubbs
commit: b14b8a67dce59c950f6f515aa1b537f742957120
Author: William Hubbs  gaikai  com>
AuthorDate: Tue May 31 21:12:19 2016 +
Commit: William Hubbs  gentoo  org>
CommitDate: Tue May 31 21:12:19 2016 +
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=b14b8a67

udev-settle: fix indentation

 init.d/udev-settle | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/init.d/udev-settle b/init.d/udev-settle
index cc87a39..e439a1d 100644
--- a/init.d/udev-settle
+++ b/init.d/udev-settle
@@ -4,9 +4,9 @@
 
 depend()
 {
-need udev
-after udev-trigger
-provide dev-settle
+   need udev
+   after udev-trigger
+   provide dev-settle
keyword -lxc -systemd-nspawn -vserver
 }
 



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2016-05-26 Thread William Hubbs
commit: 98e65b8774bfc30e30785e4cb24c9b5daba423a0
Author: William Hubbs  gmail  com>
AuthorDate: Thu May 26 15:55:57 2016 +
Commit: William Hubbs  gentoo  org>
CommitDate: Thu May 26 15:55:57 2016 +
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=98e65b87

fix shebang line in udev service script

 init.d/udev | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init.d/udev b/init.d/udev
index 458a737..6ff21b2 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -1,4 +1,4 @@
-#!/sbin/runscript
+#!/sbin/openrc-run
 # Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2015-09-10 Thread William Hubbs
commit: 823bd46baa0838bedca15b1921d76ca74082db7d
Author: Lars Wendler  gentoo  org>
AuthorDate: Thu Sep  3 17:13:27 2015 +
Commit: William Hubbs  gentoo  org>
CommitDate: Thu Sep  3 17:13:27 2015 +
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=823bd46b

fix indentation

 init.d/udev-trigger | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/init.d/udev-trigger b/init.d/udev-trigger
index a04f9e7..0f69455 100644
--- a/init.d/udev-trigger
+++ b/init.d/udev-trigger
@@ -48,9 +48,9 @@ start_post()
start-stop-daemon --stop --pidfile "${udevmonitor_pid}" 
\
--exec /bin/udevadm
fi
-   fi
-   display_hotplugged_services
-   return 0
+   fi
+   display_hotplugged_services
+   return 0
 }
 
 # This is here because some software expects /dev/root to exist.



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2015-09-10 Thread William Hubbs
commit: e59c9f640ac0e4021e0d31a8d2f647e5bd313939
Author: William Hubbs  gmail  com>
AuthorDate: Thu Sep 10 16:03:38 2015 +
Commit: William Hubbs  gentoo  org>
CommitDate: Thu Sep 10 16:03:38 2015 +
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=e59c9f64

udev: make bins variable local

 init.d/udev | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init.d/udev b/init.d/udev
index 8106a20..458a737 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -15,7 +15,7 @@ depend()
 }
 
 get_udevd_binary() {
-   bins="/sbin/udevd /lib/systemd/systemd-udevd 
/usr/lib/systemd/systemd-udevd"
+   local bins="/sbin/udevd /lib/systemd/systemd-udevd 
/usr/lib/systemd/systemd-udevd"
for f in ${bins}; do
if [ -x "$f" -a ! -L "$f" ]; then
command="$f"



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2015-09-10 Thread William Hubbs
commit: ee95471d2c09f373b0b0683e40cd0e1f1a4904ac
Author: Lars Wendler  gentoo  org>
AuthorDate: Thu Sep 10 15:57:55 2015 +
Commit: William Hubbs  gentoo  org>
CommitDate: Thu Sep 10 15:57:55 2015 +
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=ee95471d

udev: create a function to locate the binary

 init.d/udev | 27 ---
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/init.d/udev b/init.d/udev
index f286ad8..8106a20 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -14,6 +14,19 @@ depend()
keyword -lxc -systemd-nspawn -vserver
 }
 
+get_udevd_binary() {
+   bins="/sbin/udevd /lib/systemd/systemd-udevd 
/usr/lib/systemd/systemd-udevd"
+   for f in ${bins}; do
+   if [ -x "$f" -a ! -L "$f" ]; then
+   command="$f"
+   fi
+   done
+   if [ -z "$command" ]; then
+   eerror "Unable to find udev executable."
+   return 1
+   fi
+}
+
 start_pre()
 {
# make sure devtmpfs is in the kernel
@@ -45,16 +58,7 @@ start_pre()
fi
fi
 
-   bins="/sbin/udevd /lib/systemd/systemd-udevd 
/usr/lib/systemd/systemd-udevd"
-   for f in ${bins}; do
-   if [ -x "$f" -a ! -L "$f" ]; then
-   command="$f"
-   fi
-   done
-   if [ -z "$command" ]; then
-   eerror "Unable to find udev executable."
-   return 1
-   fi
+   get_udevd_binary || return 1
 
if [ -e /proc/sys/kernel/hotplug ]; then
echo "" >/proc/sys/kernel/hotplug
@@ -75,8 +79,9 @@ stop()
rc=$?
if [ $rc -ne 0 ]; then
eend $rc "Failed to stop $RC_SVCNAME using udevadm"
+   get_udevd_binary || return 1
ebegin "Trying with start-stop-daemon"
-   start-stop-daemon --stop --exec /sbin/udevd
+   start-stop-daemon --stop --exec ${command}
rc=$?
fi
eend $rc "Failed to stop $RC_SVCNAME"



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2015-06-17 Thread William Hubbs
commit: 03c02c050df2ae3d91ec6428f024d7d4042ef077
Author: Mike Gilbert floppym AT gentoo DOT org
AuthorDate: Wed Jun 17 20:36:49 2015 +
Commit: William Hubbs williamh AT gentoo DOT org
CommitDate: Wed Jun 17 21:42:14 2015 +
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=03c02c05

udev: Remove workaround for redirecting stdio to /dev/null

systemd-udevd was fixed upstream, making this hack unnecessary.

 init.d/udev | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/init.d/udev b/init.d/udev
index 4b1147f..f286ad8 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -60,15 +60,10 @@ start_pre()
echo  /proc/sys/kernel/hotplug
fi
 
-   local stderr=/dev/null
-
if yesno ${udev_debug:-NO}; then
-   command_args=${command_args} --debug
-   stderr=/run/udevdebug.log
+   command_args=${command_args} --debug 2 /run/udevdebug.log
fi
 
-   command_args=${command_args}  /dev/null  /dev/null 2 ${stderr}
-
return 0
 }
 



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2015-06-14 Thread William Hubbs
commit: b34b2d9fcc5b39e202363d874fb3a3ead6526b0d
Author: Mike Gilbert floppym AT gentoo DOT org
AuthorDate: Sat Jun 13 22:48:43 2015 +
Commit: William Hubbs williamh AT gentoo DOT org
CommitDate: Sun Jun 14 02:44:53 2015 +
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=b34b2d9f

udev: Start in daemon mode with stdin/stdout/stderr = /dev/null

Starting in daemon mode prevents udev-trigger from running before
udevd has fully started. See bug 551928.

To prevent a regression on bug 547916, we use shell redirection
to redirect the standard file descriptors to /dev/null.

X-Gentoo-Bug: 551724
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=551724

 init.d/udev | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/init.d/udev b/init.d/udev
index f26caa4..4b1147f 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -2,8 +2,7 @@
 # Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-command_args=${udev_opts}
-start_stop_daemon_args=--background
+command_args=--daemon ${udev_opts}
 description=udev manages device permissions and symbolic links in /dev
 extra_started_commands=reload
 description_reload=Reload the udev rules and databases
@@ -61,10 +60,15 @@ start_pre()
echo  /proc/sys/kernel/hotplug
fi
 
+   local stderr=/dev/null
+
if yesno ${udev_debug:-NO}; then
-   command_args=${command_args} --debug 2 /run/udevdebug.log
+   command_args=${command_args} --debug
+   stderr=/run/udevdebug.log
fi
 
+   command_args=${command_args}  /dev/null  /dev/null 2 ${stderr}
+
return 0
 }
 



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2015-06-10 Thread William Hubbs
commit: ba6eb291508d031819290e4191a883f50b24d572
Author: William Hubbs w.d.hubbs AT gmail DOT com
AuthorDate: Wed Jun 10 21:15:01 2015 +
Commit: William Hubbs williamh AT gentoo DOT org
CommitDate: Wed Jun 10 21:17:46 2015 +
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=ba6eb291

udev-trigger: Fix typos and make all functions return success

X-Gentoo-Bug: 551644
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=551644

 init.d/udev-trigger | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/init.d/udev-trigger b/init.d/udev-trigger
index b67d597..a04f9e7 100644
--- a/init.d/udev-trigger
+++ b/init.d/udev-trigger
@@ -22,6 +22,7 @@ start_pre()
--make-pidfile --pidfile ${udevmonitor_pid} \
--background --exec /bin/udevadm -- monitor 
${udev_monitor_opts}
fi
+   return 0
 }
 
 display_hotplugged_services()
@@ -34,11 +35,12 @@ display_hotplugged_services()
services=${services} ${svc}
done
[ -n ${services} ]  einfo Device initiated 
services:${HILITE}${services}${NORMAL}
+   return 0
 }
 
 start_post()
 {
-   if yesno ${udev_monitor}:-no}; then
+   if yesno ${udev_monitor:-no}; then
if yesno ${udev_monitor_keep_running:-no}; then
ewarn udevmonitor is still writing into 
${udevmonitor_log}
else
@@ -48,6 +50,7 @@ start_post()
fi
fi
display_hotplugged_services
+   return 0
 }
 
 # This is here because some software expects /dev/root to exist.
@@ -65,6 +68,7 @@ dev_root_link()
[ $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
+   return 0
 }
 
 start()



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2015-06-01 Thread William Hubbs
commit: cf7ac2fb255ff122d9e57b5b145e71bb2e021c4b
Author: William Hubbs w.d.hubbs AT gmail DOT com
AuthorDate: Mon Jun  1 15:31:31 2015 +
Commit: William Hubbs williamh AT gentoo DOT org
CommitDate: Mon Jun  1 15:31:31 2015 +
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=cf7ac2fb

udev-settle: always return success

This is how earlier versions of the scripts behave, so we should not
break expectations.

 init.d/udev-settle | 1 +
 1 file changed, 1 insertion(+)

diff --git a/init.d/udev-settle b/init.d/udev-settle
index 4c640db..cc87a39 100644
--- a/init.d/udev-settle
+++ b/init.d/udev-settle
@@ -15,4 +15,5 @@ start()
ebegin Waiting for uevents to be processed
udevadm settle --timeout=${udev_settle_timeout:-60}
eend $?
+   return 0
 }



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2015-06-01 Thread William Hubbs
commit: 84aa1a5d5896e5883c7c3adb023f2b9d30537775
Author: William Hubbs w.d.hubbs AT gmail DOT com
AuthorDate: Mon Jun  1 15:32:25 2015 +
Commit: William Hubbs williamh AT gentoo DOT org
CommitDate: Mon Jun  1 15:32:25 2015 +
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=84aa1a5d

udev-trigger: always return success

This is how earlier versions of the scripts behaved, so we should not
break expectations.

 init.d/udev-trigger | 1 +
 1 file changed, 1 insertion(+)

diff --git a/init.d/udev-trigger b/init.d/udev-trigger
index d3f40e6..b67d597 100644
--- a/init.d/udev-trigger
+++ b/init.d/udev-trigger
@@ -88,4 +88,5 @@ start()
udevadm trigger --type=subsystems --action=add
udevadm trigger --type=devices --action=add
eend $?
+   return 0
 }



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2015-05-02 Thread William Hubbs
commit: c959797a80f83ec59b0ceee4732825767a01c429
Author: William Hubbs w.d.hubbs AT gmail DOT com
AuthorDate: Sat May  2 19:44:32 2015 +
Commit: William Hubbs williamh AT gentoo DOT org
CommitDate: Sat May  2 19:44:32 2015 +
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=c959797a

Disable the scripts in a systemd-nspawn container

X-Gentoo-Bug: 548090
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=548090

 init.d/udev | 4 +---
 init.d/udev-settle  | 2 +-
 init.d/udev-trigger | 2 +-
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/init.d/udev b/init.d/udev
index e2ff830..f26caa4 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -12,9 +12,7 @@ depend()
 {
need sysfs dev-mount
before checkfs fsck
-
-   # udev does not work inside vservers
-   keyword -vserver -lxc
+   keyword -lxc -systemd-nspawn -vserver
 }
 
 start_pre()

diff --git a/init.d/udev-settle b/init.d/udev-settle
index f5253f5..4c640db 100644
--- a/init.d/udev-settle
+++ b/init.d/udev-settle
@@ -7,7 +7,7 @@ depend()
 need udev
 after udev-trigger
 provide dev-settle
-   keyword -vserver -lxc
+   keyword -lxc -systemd-nspawn -vserver
 }
 
 start()

diff --git a/init.d/udev-trigger b/init.d/udev-trigger
index abc4540..d3f40e6 100644
--- a/init.d/udev-trigger
+++ b/init.d/udev-trigger
@@ -11,7 +11,7 @@ depend()
 {
need udev
provide dev
-   keyword -vserver -lxc
+   keyword -lxc -systemd-nspawn -vserver
 }
 
 start_pre()



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2015-04-29 Thread William Hubbs
commit: b073ac774d069518ad79129d3baa6f5564f16304
Author: William Hubbs w.d.hubbs AT gmail DOT com
AuthorDate: Wed Apr 29 15:53:39 2015 +
Commit: William Hubbs williamh AT gentoo DOT org
CommitDate: Wed Apr 29 20:31:54 2015 +
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=b073ac77

Make start-stop-daemon daemonize instead of udev

This is needed since udev does not close std{in,out,err} if the --daemon
function is used, which leaves the terminal open forever.

X-Gentoo-Bug: 547196
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=547196

 init.d/udev | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/init.d/udev b/init.d/udev
index 57fae76..e2ff830 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -2,7 +2,8 @@
 # Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-command_args=--daemon ${udev_opts}
+command_args=${udev_opts}
+start_stop_daemon_args=--background
 description=udev manages device permissions and symbolic links in /dev
 extra_started_commands=reload
 description_reload=Reload the udev rules and databases



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2015-04-29 Thread William Hubbs
commit: da8cd390676a8bfb797ec399a2e9d2da7396f2c5
Author: William Hubbs w.d.hubbs AT gmail DOT com
AuthorDate: Wed Apr 29 15:53:39 2015 +
Commit: William Hubbs williamh AT gentoo DOT org
CommitDate: Thu Apr 30 02:06:24 2015 +
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=da8cd390

Make start-stop-daemon daemonize instead of udev

This is needed since udev does not close std{in,out,err} if the --daemon
function is used, which leaves the terminal open forever.

X-Gentoo-Bug: 547916
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=547916

 init.d/udev | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/init.d/udev b/init.d/udev
index 57fae76..e2ff830 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -2,7 +2,8 @@
 # Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-command_args=--daemon ${udev_opts}
+command_args=${udev_opts}
+start_stop_daemon_args=--background
 description=udev manages device permissions and symbolic links in /dev
 extra_started_commands=reload
 description_reload=Reload the udev rules and databases



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2014-12-03 Thread William Hubbs
commit: 4a106494f2d0c42ca191412ad5903e728334c5c1
Author: William Hubbs w.d.hubbs AT gmail DOT com
AuthorDate: Thu Dec  4 00:53:47 2014 +
Commit: William Hubbs williamh AT gentoo DOT org
CommitDate: Thu Dec  4 00:53:47 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/udev-gentoo-scripts.git;a=commit;h=4a106494

add provide for dev-settle

---
 init.d/udev-settle | 1 +
 1 file changed, 1 insertion(+)

diff --git a/init.d/udev-settle b/init.d/udev-settle
index dd3fe4b..f5253f5 100644
--- a/init.d/udev-settle
+++ b/init.d/udev-settle
@@ -6,6 +6,7 @@ depend()
 {
 need udev
 after udev-trigger
+provide dev-settle
keyword -vserver -lxc
 }
 



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/, conf.d/

2014-11-25 Thread William Hubbs
commit: ebb3f35bd06591bf7092cfc61e5cd51857ed888f
Author: William Hubbs w.d.hubbs AT gmail DOT com
AuthorDate: Mon Nov  3 20:31:08 2014 +
Commit: William Hubbs williamh AT gentoo DOT org
CommitDate: Tue Nov 25 20:43:15 2014 +
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 000..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 

[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2014-11-03 Thread William Hubbs
commit: 7da8580803a5d44247d117c98e5df52761ae0c0d
Author: William Hubbs w.d.hubbs AT gmail DOT com
AuthorDate: Mon Nov  3 18:49:49 2014 +
Commit: William Hubbs williamh AT gentoo DOT org
CommitDate: Mon Nov  3 20:37:00 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/udev-gentoo-scripts.git;a=commit;h=7da85808

move default for udev_monitor to the yesno calls

---
 init.d/udev | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/init.d/udev b/init.d/udev
index 72b2be2..654eee3 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -7,7 +7,6 @@ description=udev manages device permissions and symbolic links 
in /dev
 extra_started_commands=reload
 description_reload=Reload the udev rules and databases
 
-udev_monitor=${udev_monitor:-no}
 udevmonitor_log=/run/udevmonitor.log
 udevmonitor_pid=/run/udevmonitor.pid
 
@@ -76,7 +75,7 @@ start_pre()
 
 start_udevmonitor()
 {
-   yesno ${udev_monitor} || return 0
+   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} \
@@ -131,7 +130,7 @@ populate_dev()
 
 stop_udevmonitor()
 {
-   yesno ${udev_monitor} || return 0
+   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}



[gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/

2014-08-11 Thread William Hubbs
commit: 557e26c3a9b422ee2b0f1a3117cedd0854b679cc
Author: William Hubbs w.d.hubbs AT gmail DOT com
AuthorDate: Fri Aug  8 15:57:49 2014 +
Commit: William Hubbs williamh AT gentoo DOT org
CommitDate: Fri Aug  8 16:14:52 2014 +
URL:
http://git.overlays.gentoo.org/gitweb/?p=proj/udev-gentoo-scripts.git;a=commit;h=557e26c3

remove udev-mount service script

OpenRC 0.13 and newer will mount /dev correctly,. The tests to make sure
devtmpfs is in the kernel and /dev is a mounted devtmpfs have been moved
to start_pre in the udev service script.

---
 init.d/udev   | 36 ++---
 init.d/udev-mount | 81 ---
 2 files changed, 27 insertions(+), 90 deletions(-)

diff --git a/init.d/udev b/init.d/udev
index 41a6e64..72b2be2 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -13,10 +13,8 @@ udevmonitor_pid=/run/udevmonitor.pid
 
 depend()
 {
-   # we depend on udev-mount explicitly, not dev-mount generic as we don't
-   # want mdev as a dev-mount provider to come in.
provide dev
-   need sysfs udev-mount
+   need sysfs dev-mount
before checkfs fsck
 
# udev does not work inside vservers
@@ -25,8 +23,24 @@ depend()
 
 start_pre()
 {
-   if [ -e /proc/sys/kernel/hotplug ]; then
-   echo  /proc/sys/kernel/hotplug
+   # make sure devtmpfs is in the kernel
+   if ! grep -qs devtmpfs /proc/filesystems; then
+   eerror CONFIG_DEVTMPFS=y is required in your kernel 
configuration
+   eerror for this version of udev to run successfully.
+   eerror This requires immediate attention.
+   if ! mountinfo -q /dev; then
+   mount -n -t tmpfs dev /dev
+   busybox mdev -s
+   mkdir /dev/pts
+   fi
+   return 1
+   fi
+
+   # make sure /dev is a mounted devtmpfs
+   if ! mountinfo -q -f devtmpfs /dev; then
+   eerror Udev requires /dev to be a mounted devtmpfs.
+   eerror Please reconfigure your system.
+   return 1
fi
 
# load unix domain sockets if built as module, Bug #221253
@@ -38,10 +52,6 @@ start_pre()
fi
fi
 
-   if yesno ${udev_debug:-NO}; then
-   command_args=${command_args} --debug 2 /run/udevdebug.log
-   fi
-
bins=/sbin/udevd /lib/systemd/systemd-udevd 
/usr/lib/systemd/systemd-udevd
for f in ${bins}; do
if [ -x $f -a ! -L $f ]; then
@@ -53,6 +63,14 @@ start_pre()
return 1
fi
 
+   if [ -e /proc/sys/kernel/hotplug ]; then
+   echo  /proc/sys/kernel/hotplug
+   fi
+
+   if yesno ${udev_debug:-NO}; then
+   command_args=${command_args} --debug 2 /run/udevdebug.log
+   fi
+
return 0
 }
 

diff --git a/init.d/udev-mount b/init.d/udev-mount
deleted file mode 100644
index a868340..000
--- a/init.d/udev-mount
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-description=mount devtmpfs on /dev
-
-depend()
-{
-   provide dev-mount
-   keyword -vserver -lxc
-}
-
-mount_dev_directory()
-{
-   local mounted=false fstab=false action=--mount msg=Mounting rc=0
-
-   if ! grep -qs devtmpfs /proc/filesystems; then
-   eerror CONFIG_DEVTMPFS=y is required in your kernel 
configuration
-   eerror for this version of udev to run successfully.
-   eerror This requires immediate attention.
-   if ! mountinfo -q /dev; then
-   mount -n -t tmpfs dev /dev
-   busybox mdev -s
-   mkdir /dev/pts
-   fi
-   return 1
-   fi
-
-   # Is /dev already a mounted devtmpfs?
-   mountinfo -q -f devtmpfs /dev  mounted=true
-
-   # If an entry for /dev exists in fstab it must be a devtmpfs.
-   fstabinfo -q -t devtmpfs /dev  fstab=true
-
-   # No options are processed here as they should all be in /etc/fstab
-   if $fstab; then
-   $mounted  action=--remount  msg=Remounting
-   ebegin $msg /dev according to /etc/fstab
-   fstabinfo $action /dev
-   rc=$?
-   elif ! $mounted; then
-   ebegin Mounting /dev
-   # Some devices require exec, Bug #92921
-   mount -n -t devtmpfs -o exec,nosuid,mode=0755,size=10M udev 
/dev
-   rc=$?
-   else
-   ebegin Using /dev mounted from kernel
-   fi
-
-   eend $rc
-}
-
-seed_dev()
-{
-   # Seed /dev with some things that we know we need
-
-   # creating /dev/console, /dev/tty and /dev/tty1 to be able to write
-   # to $CONSOLE with/without bootsplash before udevd creates it
-   [ -c /dev/console ] || mknod -m 600