[PATCH] don't overwrite the config file for tgt-admin if it's already there

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Right now, "make install" will overwrite a config file for tgt-admin placed in /etc/tgt/targets.conf.

Generally, one don't want to overwrite it - so copy the default file only if it's not there already.


Signed-off-by: Tomasz Chmielewski <mangoo@xxxxxxxx>

diff --git a/conf/Makefile b/conf/Makefile
index 4f5ae77..0ef29ab 100644
--- a/conf/Makefile
+++ b/conf/Makefile
@@ -6,7 +6,9 @@ all:
.PHONY: install
install:
       install -d -m 755 $(DESTDIR)$(sysconfdir)/tgt
-       install -m 644 targets.conf $(DESTDIR)$(sysconfdir)/tgt
+       if [ ! -f $(DESTDIR)$(sysconfdir)/tgt/targets.conf ] ; then \
+               install -m 644 targets.conf $(DESTDIR)$(sysconfdir)/tgt ; \
+       fi

.PHONY: clean
clean:



--
Tomasz Chmielewski
http://wpkg.org
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux