From: Olaf Hering <olh@suse.de>
To: linux-hotplug@vger.kernel.org
Subject: Re: use udevdir in udev.conf
Date: Wed, 10 Dec 2003 22:53:30 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-107109712814665@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-107083446801469@msgid-missing>
On Tue, Dec 09, Greg KH wrote:
> On Sun, Dec 07, 2003 at 11:00:41PM +0100, Olaf Hering wrote:
> > udevdir is a define, but udev.conf has a hardcoded path. Maybe this
> > config file should be generated on the fly, like shown below.
>
> Yes, something like this should probably be done. But your patch is
> creating udev.conf.in, not udev.conf, right? Want to switch that
> around, and then I'll rename the current udev.conf to udev.conf.in.
just to keep the patch small.
diff -p -purN /olaf/sources/tree/udev.bk/Makefile udev.bk/Makefile
--- /olaf/sources/tree/udev.bk/Makefile 2003-12-10 02:02:02.000000000 +0100
+++ udev.bk/Makefile 2003-12-10 23:51:21.000000000 +0100
@@ -52,7 +52,7 @@ INSTALL_SCRIPT = ${INSTALL_PROGRAM}
EXTRAS
# place to put our device nodes
-udevdir = ${prefix}/udev/
+udevdir = ${prefix}/udev
# Comment out this line to build with something other
# than the local version of klibc
@@ -196,8 +196,8 @@ GEN_HEADERS = udev_version.h
# Rules on how to create the generated header files
udev_version.h:
@echo \#define UDEV_VERSION \"$(VERSION)\" > $@
- @echo \#define UDEV_ROOT \"$(udevdir)\" >> $@
- @echo \#define UDEV_DB \"$(udevdir)\.udev.tdb\" >> $@
+ @echo \#define UDEV_ROOT \"$(udevdir)/\" >> $@
+ @echo \#define UDEV_DB \"$(udevdir)/\.udev.tdb\" >> $@
@echo \#define UDEV_CONFIG_DIR \"$(configdir)\" >> $@
@echo \#define UDEV_CONFIG_FILE \"$(configdir)\udev.conf\" >> $@
@echo \#define UDEV_RULES_FILE \"$(configdir)\udev.rules\" >> $@
@@ -212,7 +212,7 @@ $(ROOT): $(OBJS)
clean:
-find . \( -not -type d \) -and \( -name '*~' -o -name '*.[oas]' \) -type f -print \
| xargs rm -f
- -rm -f core $(ROOT) $(GEN_HEADERS)
+ -rm -f core $(ROOT) $(GEN_HEADERS) udev.conf
$(MAKE) -C klibc clean
@for target in $(EXTRAS) ; do \
echo $$target ; \
@@ -271,6 +271,7 @@ install: install-dbus-policy all
$(INSTALL) -d $(DESTDIR)$(hotplugdir)
$(INSTALL_PROGRAM) -D $(ROOT) $(DESTDIR)$(sbindir)/$(ROOT)
$(INSTALL_DATA) -D udev.8 $(DESTDIR)$(mandir)/man8/udev.8
+ sed -e "s-@udevdir@-$(udevdir)-" < udev.conf.in > udev.conf
$(INSTALL_DATA) udev.conf $(DESTDIR)$(configdir)
$(INSTALL_DATA) udev.rules $(DESTDIR)$(configdir)
$(INSTALL_DATA) udev.permissions $(DESTDIR)$(configdir)
diff -p -purN /olaf/sources/tree/udev.bk/udev.conf udev.bk/udev.conf
--- /olaf/sources/tree/udev.bk/udev.conf 2003-12-10 02:05:30.000000000 +0100
+++ udev.bk/udev.conf 1970-01-01 01:00:00.000000000 +0100
@@ -1,23 +0,0 @@
-# udev.conf
-# The main config file for udev
-#
-# This file can be used to override some of udev's default values
-# for where it looks for files, and where it places device nodes.
-
-
-# udev_root - where in the filesystem to place the device nodes
-udev_root="/udev/"
-
-# udev_db - The name and location of the udev database.
-udev_db="/udev/.udev.tdb"
-
-# udev_rules - The name and location of the udev rules file
-udev_rules="/etc/udev/udev.rules"
-
-# udev_permissions - The name and location of the udev permission file
-udev_permissions="/etc/udev/udev.permissions"
-
-# default_mode - set the default mode for all nodes that have no
-# explicit match in the permissions file
-default_mode="0600"
-
diff -p -purN /olaf/sources/tree/udev.bk/udev.conf.in udev.bk/udev.conf.in
--- /olaf/sources/tree/udev.bk/udev.conf.in 1970-01-01 01:00:00.000000000 +0100
+++ udev.bk/udev.conf.in 2003-12-10 23:49:10.000000000 +0100
@@ -0,0 +1,23 @@
+# udev.conf
+# The main config file for udev
+#
+# This file can be used to override some of udev's default values
+# for where it looks for files, and where it places device nodes.
+
+
+# udev_root - where in the filesystem to place the device nodes
+udev_root="@udevdir@/"
+
+# udev_db - The name and location of the udev database.
+udev_db="@udevdir@/.udev.tdb"
+
+# udev_rules - The name and location of the udev rules file
+udev_rules="/etc/udev/udev.rules"
+
+# udev_permissions - The name and location of the udev permission file
+udev_permissions="/etc/udev/udev.permissions"
+
+# default_mode - set the default mode for all nodes that have no
+# explicit match in the permissions file
+default_mode="0600"
+
--
USB is for mice, FireWire is for men!
sUse lINUX ag, n√úRNBERG
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2003-12-10 22:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-07 22:00 use udevdir in udev.conf Olaf Hering
2003-12-08 3:07 ` Marco d'Itri
2003-12-10 1:05 ` Greg KH
2003-12-10 22:53 ` Olaf Hering [this message]
2003-12-11 8:12 ` Greg KH
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=marc-linux-hotplug-107109712814665@msgid-missing \
--to=olh@suse.de \
--cc=linux-hotplug@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).