diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2013-03-24 15:50:19 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2013-03-24 15:50:19 +0000 |
commit | 8de1543bbcb2c5d18e30dc8de065d69c0ced8568 (patch) | |
tree | e89d2494f85a9d123e85976b157b8a38f489d37a /eclass/udev.eclass | |
parent | Stable on amd64, wrt bug #462902 (diff) | |
download | gentoo-2-8de1543bbcb2c5d18e30dc8de065d69c0ced8568.tar.gz gentoo-2-8de1543bbcb2c5d18e30dc8de065d69c0ced8568.tar.bz2 gentoo-2-8de1543bbcb2c5d18e30dc8de065d69c0ced8568.zip |
New udev_reload function to update rules and dbs
Diffstat (limited to 'eclass/udev.eclass')
-rw-r--r-- | eclass/udev.eclass | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/eclass/udev.eclass b/eclass/udev.eclass index 8641f4460160..c503f6dce0de 100644 --- a/eclass/udev.eclass +++ b/eclass/udev.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/udev.eclass,v 1.9 2013/01/29 15:33:37 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/udev.eclass,v 1.10 2013/03/24 15:50:19 ssuominen Exp $ # @ECLASS: udev.eclass # @MAINTAINER: @@ -98,3 +98,18 @@ udev_newrules() { newins "${@}" ) } + +# @FUNCTION: udev_reload +# @DESCRIPTION: +# Execute udevadm control --reload to reload rules and databases +udev_reload() { + if [[ ${ROOT} != "" ]] && [[ ${ROOT} != "/" ]]; then + return 0 + fi + + if [[ -d ${ROOT}/run/udev ]]; then + ebegin "Running udev control --reload for reloading rules and databases" + udevadm control --reload + eend $? + fi +} |