linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* use udevdir in udev.conf
@ 2003-12-07 22:00 Olaf Hering
  2003-12-08  3:07 ` Marco d'Itri
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Olaf Hering @ 2003-12-07 22:00 UTC (permalink / raw)
  To: linux-hotplug

udevdir is a define, but udev.conf has a hardcoded path. Maybe this
config file should be generated on the fly, like shown below.
The default permissions should be 0600.

diff -purNx linux udev-008.orig/udev.conf udev-008/udev.conf
--- udev-008.orig/udev.conf     2003-12-03 02:11:15.000000000 +0100
+++ udev-008/udev.conf  2003-12-07 22:40:05.000000000 +0100
@@ -6,10 +6,10 @@


 # udev_root - where in the filesystem to place the device nodes
-udev_root="/udev/"
+udev_root="@udevdir@/"
 
 # udev_db - The name and location of the udev database.
-udev_db="/udev/.udev.tdb"
+udev_db="@udevdir@/.udev.tdb"
 
 # udev_rules - The name and location of the udev rules file
 udev_rules="/etc/udev/udev.rules"
@@ -19,5 +19,5 @@ udev_permissions="/etc/udev/udev.permiss
   
 # default_mode - set the default mode for all nodes that have no
 #                explicit match in the permissions file
-default_mode="0666"
+default_mode="0600"
 
diff -purNx linux udev-008.orig/Makefile udev-008/Makefile
--- udev-008.orig/Makefile      2003-12-07 22:39:52.000000000 +0100
+++ udev-008/Makefile   2003-12-07 22:40:05.000000000 +0100
@@ -47,7 +47,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
@@ -184,8 +184,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\" >> $@
@@ -246,7 +246,8 @@ install: all
        $(INSTALL) -d $(DESTDIR)$(hotplugdir)
        $(INSTALL_PROGRAM) -D $(ROOT) $(DESTDIR)$(sbindir)/$(ROOT)
        $(INSTALL_DATA) -D udev.8 $(DESTDIR)$(mandir)/man8/udev.8
-       $(INSTALL_DATA) udev.conf $(DESTDIR)$(configdir)
+       sed -e "s-@udevdir@-$(udevdir)-" < udev.conf > udev.conf.in
+       $(INSTALL_DATA) udev.conf.in $(DESTDIR)$(configdir)
        $(INSTALL_DATA) udev.rules $(DESTDIR)$(configdir)
        $(INSTALL_DATA) udev.permissions $(DESTDIR)$(configdir)
        - rm -f $(DESTDIR)$(hotplugdir)/udev.hotplug


-- 
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

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

end of thread, other threads:[~2003-12-11  8:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2003-12-11  8:12 ` Greg KH

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).