From: kay.sievers@vrfy.org Date: Sat, 20 Dec 2003 02:29:05 +0000 (-0800) Subject: [PATCH] don't overwrite old config on install X-Git-Tag: 010~20 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7591c18a8f3460d3e7cab85d02915c4b51638b5c;p=systemd [PATCH] don't overwrite old config on install Here is a patch for the Makefile to look for a already installed config and not to overwrite it. --- diff --git a/Makefile b/Makefile index c2ed6595..3e220b47 100644 --- a/Makefile +++ b/Makefile @@ -274,18 +274,31 @@ uninstall-dbus-policy: - 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)" \