All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: [udev] don't overwrite old config on install
Date: Thu, 18 Dec 2003 02:33:43 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-107171495424791@msgid-missing> (raw)

[-- 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)" \

             reply	other threads:[~2003-12-18  2:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-18  2:33 Kay Sievers [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-12-19 18:30 [udev] don't overwrite old config on install 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-107171495424791@msgid-missing \
    --to=kay.sievers@vrfy.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.