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

* Re: use udevdir in udev.conf
  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
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Marco d'Itri @ 2003-12-08  3:07 UTC (permalink / raw)
  To: linux-hotplug

On Dec 07, Olaf Hering <olh@suse.de> wrote:

 >The default permissions should be 0600.
Agreed, I already changed this in the debian package.

-- 
ciao, |
Marco | [3504 reiPsRdxK9aBs]


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

* Re: use udevdir in udev.conf
  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
  3 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2003-12-10  1:05 UTC (permalink / raw)
  To: linux-hotplug

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.

> The default permissions should be 0600.

Good point, I'll go change them.

thanks,

greg k-h


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

* Re: use udevdir in udev.conf
  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
  3 siblings, 0 replies; 5+ messages in thread
From: Olaf Hering @ 2003-12-10 22:53 UTC (permalink / raw)
  To: linux-hotplug

 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

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

* Re: use udevdir in udev.conf
  2003-12-07 22:00 use udevdir in udev.conf Olaf Hering
                   ` (2 preceding siblings ...)
  2003-12-10 22:53 ` Olaf Hering
@ 2003-12-11  8:12 ` Greg KH
  3 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2003-12-11  8:12 UTC (permalink / raw)
  To: linux-hotplug

On Wed, Dec 10, 2003 at 11:53:30PM +0100, Olaf Hering wrote:
>  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. 

Thanks, I've applied this.

greg k-h


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