linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [udev] don't overwrite old config on install
@ 2003-12-18  2:33 Kay Sievers
  0 siblings, 0 replies; 2+ messages in thread
From: Kay Sievers @ 2003-12-18  2:33 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 112 bytes --]


Here is a patch for the Makefile to look for a already
installed config and not to overwrite it.


thanks,
Kay

[-- Attachment #2: 02-dont-overwrite-config-on-install.diff --]
[-- Type: text/plain, Size: 1648 bytes --]

diff -Nru a/Makefile b/Makefile
--- a/Makefile	Thu Dec 18 03:15:23 2003
+++ b/Makefile	Thu Dec 18 03:15:23 2003
@@ -274,18 +274,31 @@
 	-
 endif
 
-install: install-dbus-policy all $(GEN_CONFIGS)
-	$(INSTALL) -d $(DESTDIR)$(udevdir)
+install-config: $(GEN_CONFIGS)
 	$(INSTALL) -d $(DESTDIR)$(configdir)
+	@if [ ! -r $(DESTDIR)$(configdir)udev.conf ]; then \
+		echo $(INSTALL_DATA) udev.conf $(DESTDIR)$(configdir); \
+		$(INSTALL_DATA) udev.conf $(DESTDIR)$(configdir); \
+	fi
+	@if [ ! -r $(DESTDIR)$(configdir)udev.rules ]; then \
+		echo $(INSTALL_DATA) udev.rules $(DESTDIR)$(configdir); \
+		$(INSTALL_DATA) udev.rules $(DESTDIR)$(configdir); \
+	fi
+	@if [ ! -r $(DESTDIR)$(configdir)udev.permissions ]; then \
+		echo $(INSTALL_DATA) udev.permissions $(DESTDIR)$(configdir); \
+		$(INSTALL_DATA) udev.permissions $(DESTDIR)$(configdir); \
+	fi
+
+
+
+install: install-config install-dbus-policy all
+	$(INSTALL) -d $(DESTDIR)$(udevdir)
 	$(INSTALL) -d $(DESTDIR)$(hotplugdir)
 	$(INSTALL_PROGRAM) -D $(ROOT) $(DESTDIR)$(sbindir)/$(ROOT)
 	$(INSTALL_PROGRAM) -D etc/init.d/udev $(DESTDIR)$(initdir)/udev
 	$(INSTALL_DATA) -D udev.8 $(DESTDIR)$(mandir)/man8/udev.8
-	$(INSTALL_DATA) udev.conf $(DESTDIR)$(configdir)
-	$(INSTALL_DATA) udev.rules $(DESTDIR)$(configdir)
-	$(INSTALL_DATA) udev.permissions $(DESTDIR)$(configdir)
 	- rm -f $(DESTDIR)$(hotplugdir)/udev.hotplug
-	- ln -s $(sbindir)/$(ROOT) $(DESTDIR)$(hotplugdir)/udev.hotplug
+	- ln -f -s $(sbindir)/$(ROOT) $(DESTDIR)$(hotplugdir)/udev.hotplug
 	@extras="$(EXTRAS)" ; for target in $$extras ; do \
 		echo $$target ; \
 		$(MAKE) prefix=$(prefix) LD="$(LD)" SYSFS="$(SYSFS)" \

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

* Re: [udev] don't overwrite old config on install
@ 2003-12-19 18:30 Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2003-12-19 18:30 UTC (permalink / raw)
  To: linux-hotplug

On Thu, Dec 18, 2003 at 03:33:43AM +0100, Kay Sievers wrote:
> 
> Here is a patch for the Makefile to look for a already
> installed config and not to overwrite it.

Nice, 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] 2+ messages in thread

end of thread, other threads:[~2003-12-19 18:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-18  2:33 [udev] don't overwrite old config on install Kay Sievers
  -- strict thread matches above, loose matches on Subject: below --
2003-12-19 18:30 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).