Re: [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]

 



FUJITA Tomonori wrote:
On Mon, 26 Oct 2009 10:48:10 +0100
Tomasz Chmielewski <mangoo@xxxxxxxx> wrote:

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.

It makes sense but the patch is corrupted (tabs are converted to
spaces). Can you resend the proper one?

I hope that one's not corrupted:


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:

--
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