From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/, /
Date: Sat, 29 Oct 2011 20:24:03 +0000 (UTC) [thread overview]
Message-ID: <ba62574fdc12c39736032fa7be3715c202f9326c.WilliamH@gentoo> (raw)
commit: ba62574fdc12c39736032fa7be3715c202f9326c
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 29 20:16:08 2011 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sat Oct 29 20:16:08 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/udev-gentoo-scripts.git;a=commit;h=ba62574f
Add kv_min variable to the udev init script
The makefile was hard coding a value for the minimal kernel version into
the init script. I feel that a better approach is to have a variable
with a default value in the init script. For testing, it is possible to
adjust the value in /etc/conf.d/udev. I deliberately did not document
this in the conf.d file, because this is a value we would not want users
to modify.
---
Makefile | 4 ----
init.d/udev | 5 +++--
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index 055d71a..028dcec 100644
--- a/Makefile
+++ b/Makefile
@@ -7,8 +7,6 @@ MODPROBE_DIR ?= $(SYSCONFDIR)/modprobe.d
VERSION = $(shell git describe --tags)
-KV_min ?= 2.6.24
-
DESTNAME = udev-gentoo-scripts-$(VERSION)
HELPERS = \
@@ -33,8 +31,6 @@ install:
@install -m 0755 init.d/* $(DESTDIR)$(INITD)
@install -d $(DESTDIR)$(MODPROBE_DIR)
@install -m 0644 modprobe.d/* $(DESTDIR)$(MODPROBE_DIR)
- @sed -e "s/%KV_MIN%/$(KV_min)/" \
- -i "$(DESTDIR)$(INITD)"/udev
check-git-repository:
git diff --quiet || { echo 'STOP, you have uncommitted changes in the working directory' ; false ; }
diff --git a/init.d/udev b/init.d/udev
index 51e7081..ea10111 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -15,6 +15,7 @@ udev_debug="${udev_debug:-no}"
udev_monitor="${udev_monitor:-no}"
udev_monitor_keep_running="${udev_monitor_keep_running:-no}"
udev_settle_timeout="${udev_settle_timeout:-60}"
+kv_min="${kb_min:-2.6.34}"
depend()
{
@@ -34,9 +35,9 @@ depend()
# Maybe something like udevd --test || exit $?
check_kernel()
{
- if [ $(get_KV) -lt $(KV_to_int '%KV_MIN%') ]; then
+ if [ $(get_KV) -lt $(KV_to_int ${kv_min}) ]; then
eerror "Your kernel is too old to work with this version of udev."
- eerror "Current udev only supports Linux kernel %KV_MIN% and newer."
+ eerror "Current udev only supports Linux kernel ${kv_min} and newer."
return 1
fi
return 0
next reply other threads:[~2011-10-29 20:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-29 20:24 William Hubbs [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-08-08 18:37 [gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/, / William Hubbs
2012-08-07 17:29 William Hubbs
2011-10-09 15:24 William Hubbs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ba62574fdc12c39736032fa7be3715c202f9326c.WilliamH@gentoo \
--to=williamh@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox