[Kimchi-devel] [PATCH 1/3] add a packaged file to tell in which path kimchi run

shaohef at linux.vnet.ibm.com shaohef at linux.vnet.ibm.com
Fri Apr 11 15:50:30 UTC 2014


From: ShaoHe Feng <shaohef at linux.vnet.ibm.com>

It means the kimchi run in package install path when the packaged file exists.

Signed-off-by: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
---
 Makefile.am                   | 2 ++
 contrib/kimchi.spec.fedora.in | 1 +
 contrib/kimchi.spec.suse.in   | 1 +
 3 files changed, 4 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 6831b5d..290e3dd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -102,11 +102,13 @@ all-local:
 install-deb: install
 	cp -R $(top_srcdir)/contrib/DEBIAN $(DESTDIR)/
 	$(MKDIR_P) $(DESTDIR)/etc/init
+	$(MKDIR_P) $(DESTDIR)/lib/kimchi
 	$(MKDIR_P) $(DESTDIR)/usr/lib/firewalld/services
 	cp -R $(top_srcdir)/contrib/kimchid-upstart.conf.debian \
 		$(DESTDIR)/etc/init/kimchid.conf
 	cp -R $(top_srcdir)/src/firewalld.xml \
 		$(DESTDIR)/usr/lib/firewalld/services/kimchid.xml
+	touch $(DESTDIR)/lib/kimchi/packaged
 
 
 deb: contrib/make-deb.sh
diff --git a/contrib/kimchi.spec.fedora.in b/contrib/kimchi.spec.fedora.in
index 1cd99b0..2e66b00 100644
--- a/contrib/kimchi.spec.fedora.in
+++ b/contrib/kimchi.spec.fedora.in
@@ -83,6 +83,7 @@ install -Dm 0755 contrib/kimchid.sysvinit %{buildroot}%{_initrddir}/kimchid
 %endif
 
 %post
+touch %{_localstatedir}/lib/kimchi/packaged
 if [ $1 -eq 1 ] ; then
     /bin/systemctl enable kimchid.service >/dev/null 2>&1 || :
     # Initial installation
diff --git a/contrib/kimchi.spec.suse.in b/contrib/kimchi.spec.suse.in
index efb2c08..ee69384 100644
--- a/contrib/kimchi.spec.suse.in
+++ b/contrib/kimchi.spec.suse.in
@@ -51,6 +51,7 @@ install -Dm 0755 contrib/kimchid.sysvinit %{buildroot}%{_initrddir}/kimchid
 
 
 %post
+touch %{_localstatedir}/lib/kimchi/packaged
 chkconfig kimchid on
 
 %preun
-- 
1.8.5.3




More information about the Kimchi-devel mailing list