linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Olaf Hering <olh@suse.de>
To: linux-hotplug@vger.kernel.org
Subject: use udevdir in udev.conf
Date: Sun, 07 Dec 2003 22:00:41 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-107083446801469@msgid-missing> (raw)

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

             reply	other threads:[~2003-12-07 22:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-07 22:00 Olaf Hering [this message]
2003-12-08  3:07 ` use udevdir in udev.conf Marco d'Itri
2003-12-10  1:05 ` Greg KH
2003-12-10 22:53 ` Olaf Hering
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-107083446801469@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).