From 5c642ab1c39fde2b6515ab0653fd084a439077a0 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 5 Apr 2011 13:44:40 +0000 Subject: added nopsyncstated to debian package diff --git a/rhnop-client/Makefile b/rhnop-client/Makefile index f85b59d..4e84c7a 100644 --- a/rhnop-client/Makefile +++ b/rhnop-client/Makefile @@ -46,6 +46,9 @@ install-bin: $(EXECUTABLE) $(INSTALL) -m 755 $(EXECUTABLE) $(DESTDIR)$(BINDIR) $(SED) -e 's#^conffile = "nopcollectd#conffile = "$(ETCDIR)/rhnop/nopcollectd#' -i $(DESTDIR)$(BINDIR)/$(EXECUTABLE) $(SED) -e 's#_rhnoplibdir_/?.lua#$(LIBDIR)/?.lua#' -i $(DESTDIR)$(BINDIR)/$(EXECUTABLE) + $(INSTALL) -m 755 nopsysstated $(DESTDIR)$(BINDIR) + $(SED) -e 's#^conffile = "nopsysstated#conffile = "$(ETCDIR)/rhnop/nopsysstated#' -i $(DESTDIR)$(BINDIR)/nopsysstated + $(SED) -e 's#_rhnoplibdir_/?.lua#$(LIBDIR)/?.lua#' -i $(DESTDIR)$(BINDIR)/nopsysstated install-lib: $(INSTALL) -d $(DESTDIR)$(LIBDIR) @@ -55,6 +58,7 @@ install-lib: install-etc: $(INSTALL) -d $(DESTDIR)$(ETCDIR)/rhnop $(INSTALL) -m 640 nopcollectd.*.conf $(DESTDIR)$(ETCDIR)/rhnop + $(INSTALL) -m 640 nopsysstated.conf $(DESTDIR)$(ETCDIR)/rhnop uninstall: remove diff --git a/rhnop-client/debian/rhnop-client.state.runit b/rhnop-client/debian/rhnop-client.state.runit new file mode 100644 index 0000000..f044abf --- /dev/null +++ b/rhnop-client/debian/rhnop-client.state.runit @@ -0,0 +1,5 @@ +#!/bin/sh +set -e + +exec 2>&1 +exec chpst -u rhnop:rhnop /usr/bin/nopsysstated diff --git a/rhnop-client/debian/rhnop-client.state.runit.log b/rhnop-client/debian/rhnop-client.state.runit.log new file mode 100644 index 0000000..7a67bb3 --- /dev/null +++ b/rhnop-client/debian/rhnop-client.state.runit.log @@ -0,0 +1,9 @@ +#!/bin/sh +set -e + +LOG_D="/var/log/nopsysstated/" +if [ ! -d "$LOG_D" ]; then + mkdir -p -m0750 "$LOG_D" +fi +chown root:adm "$LOG_D" +exec chpst -u root:adm svlogd -tt "$LOG_D" diff --git a/rhnop-client/debian/rules b/rhnop-client/debian/rules index 63f5fdd..ef73f66 100755 --- a/rhnop-client/debian/rules +++ b/rhnop-client/debian/rules @@ -44,6 +44,11 @@ install: build cp $(CURDIR)/debian/rhnop-client.standby.runit $(CURDIR)/debian/rhnop-client/etc/sv/rhnop-client.standby/run ln -s /var/run/sv.rhnop-client.standby.log/ $(CURDIR)/debian/rhnop-client/etc/sv/rhnop-client.standby/log/supervise cp $(CURDIR)/debian/rhnop-client.standby.runit.log $(CURDIR)/debian/rhnop-client/etc/sv/rhnop-client.standby/log/run + mkdir -p $(CURDIR)/debian/rhnop-client/etc/sv/rhnop-client.state/log + ln -s /var/run/sv.rhnop-client.state/ $(CURDIR)/debian/rhnop-client/etc/sv/rhnop-client.state/supervise + cp $(CURDIR)/debian/rhnop-client.state.runit $(CURDIR)/debian/rhnop-client/etc/sv/rhnop-client.state/run + ln -s /var/run/sv.rhnop-client.state.log/ $(CURDIR)/debian/rhnop-client/etc/sv/rhnop-client.state/log/supervise + cp $(CURDIR)/debian/rhnop-client.state.runit.log $(CURDIR)/debian/rhnop-client/etc/sv/rhnop-client.state/log/run # Build architecture-independent files here. binary-indep: install @@ -61,10 +66,13 @@ binary-arch: install dh_compress dh_fixperms chmod 640 debian/rhnop-client/etc/rhnop/nopcollectd.*.conf + chmod 640 debian/rhnop-client/etc/rhnop/nopsysstated.conf chmod 755 debian/rhnop-client/etc/sv/rhnop-client.master/run chmod 755 debian/rhnop-client/etc/sv/rhnop-client.master/log/run chmod 755 debian/rhnop-client/etc/sv/rhnop-client.standby/run chmod 755 debian/rhnop-client/etc/sv/rhnop-client.standby/log/run + chmod 755 debian/rhnop-client/etc/sv/rhnop-client.state/run + chmod 755 debian/rhnop-client/etc/sv/rhnop-client.state/log/run dh_installdeb dh_shlibdeps dh_gencontrol -- cgit v0.10.2