[csw-devel] SF.net SVN: gar:[6955] csw/mgar/pkg/cswpkgsyslog/trunk
bdwalton at users.sourceforge.net
bdwalton at users.sourceforge.net
Fri Oct 23 15:20:01 CEST 2009
Revision: 6955
http://gar.svn.sourceforge.net/gar/?rev=6955&view=rev
Author: bdwalton
Date: 2009-10-23 13:20:00 +0000 (Fri, 23 Oct 2009)
Log Message:
-----------
cswpkgsyslog: update scripts and gar recipe for new name
Modified Paths:
--------------
csw/mgar/pkg/cswpkgsyslog/trunk/Makefile
Added Paths:
-----------
csw/mgar/pkg/cswpkgsyslog/trunk/files/01-CSWcswpkgsyslog-postupgrade
csw/mgar/pkg/cswpkgsyslog/trunk/files/01-CSWcswpkgsyslog-preupgrade
Removed Paths:
-------------
csw/mgar/pkg/cswpkgsyslog/trunk/files/01-CSWcswpkglogger-postupgrade
csw/mgar/pkg/cswpkgsyslog/trunk/files/01-CSWcswpkglogger-preupgrade
Modified: csw/mgar/pkg/cswpkgsyslog/trunk/Makefile
===================================================================
--- csw/mgar/pkg/cswpkgsyslog/trunk/Makefile 2009-10-23 13:14:58 UTC (rev 6954)
+++ csw/mgar/pkg/cswpkgsyslog/trunk/Makefile 2009-10-23 13:20:00 UTC (rev 6955)
@@ -1,4 +1,4 @@
-GARNAME = cswpkglogger
+GARNAME = cswpkgsyslog
GARVERSION = 1.0
CATEGORIES = utils
@@ -33,10 +33,10 @@
HOOKS = $(PREHOOKS) $(POSTHOOKS)
install-custom:
- @echo Installing CSWcswpkglogger files...
- @( ginstall -m 0755 -d $(DESTDIR)/opt/csw/share/doc/cswpkglogger/ $(HOOKDIR) $(addprefix $(HOOKDIR)/,$(addsuffix .d,$(HOOKS))); \
- ginstall -m 0644 $(FILEDIR)/README $(DESTDIR)/opt/csw/share/doc/cswpkglogger/; \
- ginstall -m 0755 $(FILEDIR)/01-CSWcswpkglogger-postupgrade $(HOOKDIR)/postupgrade.d/; \
- ln $(HOOKDIR)/postupgrade.d/01-CSWcswpkglogger-postupgrade $(HOOKDIR)/postinstall.d/01-CSWcswpkglogger-postinstall; \
- ln $(HOOKDIR)/postupgrade.d/01-CSWcswpkglogger-postupgrade $(HOOKDIR)/postremove.d/01-CSWcswpkglogger-postremove; \
- ginstall -m 0755 $(FILEDIR)/01-CSWcswpkglogger-preupgrade $(HOOKDIR)/preupgrade.d/;)
+ @echo Installing CSW$(GARNAME) files...
+ @( ginstall -m 0755 -d $(DESTDIR)/opt/csw/share/doc/$(GARNAME)/ $(HOOKDIR) $(addprefix $(HOOKDIR)/,$(addsuffix .d,$(HOOKS))); \
+ ginstall -m 0644 $(FILEDIR)/README $(DESTDIR)/opt/csw/share/doc/$(GARNAME)/; \
+ ginstall -m 0755 $(FILEDIR)/01-CSW$(GARNAME)-postupgrade $(HOOKDIR)/postupgrade.d/; \
+ ln $(HOOKDIR)/postupgrade.d/01-CSW$(GARNAME)-postupgrade $(HOOKDIR)/postinstall.d/01-CSW$(GARNAME)-postinstall; \
+ ln $(HOOKDIR)/postupgrade.d/01-CSW$(GARNAME)-postupgrade $(HOOKDIR)/postremove.d/01-CSW$(GARNAME)-postremove; \
+ ginstall -m 0755 $(FILEDIR)/01-CSW$(GARNAME)-preupgrade $(HOOKDIR)/preupgrade.d/;)
Deleted: csw/mgar/pkg/cswpkgsyslog/trunk/files/01-CSWcswpkglogger-postupgrade
===================================================================
--- csw/mgar/pkg/cswpkgsyslog/trunk/files/01-CSWcswpkglogger-postupgrade 2009-10-23 13:14:58 UTC (rev 6954)
+++ csw/mgar/pkg/cswpkgsyslog/trunk/files/01-CSWcswpkglogger-postupgrade 2009-10-23 13:20:00 UTC (rev 6955)
@@ -1,62 +0,0 @@
-#!/opt/csw/bin/bash
-
-script=$0
-
-set -- ${1/-/ }
-PKG=$1
-VER=$2
-
-function logdie() {
- logger -t "cswpkglogger" "$1"
- exit 0
-}
-
-function success() {
- case ${script} in
- *install) MSG="installed ${PKG} ${VER}";;
- *upgrade) MSG="upgraded ${PKG} to ${VER} (from: $1)";;
- *remove) MSG="removed ${PKG} ${VER}";;
- esac
-
- logdie "${MSG}"
-}
-
-function failure() {
- case ${script} in
- *install) MSG="Failed to install ${PKG} ${VER}";;
- *upgrade) MSG="Failed to upgrade ${PKG} ${VER} (current: $1)";;
- *remove) MSG="Failed to remove ${PKG} ${VER}";;
- esac
-
- logdie "${MSG}"
-}
-
-if [ -d /var/sadm/pkg/${PKG} ]; then
- SYSTEMVER=$(pkgparam ${PKG} VERSION 2>/dev/null)
- pf=/var/opt/csw/pkg-hooks/CSWcswpkglogger.upgrade.${PKG}
- if [ -f ${pf} ]; then
- PREVVER=$(cat ${pf} 2>/dev/null)
- rm -f ${pf}
- fi
-
- case ${script} in
- *remove)
- failure
- ;;
- *install|*upgrade)
- case "${VER}" in
- ${SYSTEMVER}) success ${PREVVER};;
- *) failure ${SYSTEMVER};;
- esac
- ;;
- esac
-else
- case ${script} in
- *remove)
- success
- ;;
- *install|*upgrade)
- failure
- ;;
- esac
-fi
Deleted: csw/mgar/pkg/cswpkgsyslog/trunk/files/01-CSWcswpkglogger-preupgrade
===================================================================
--- csw/mgar/pkg/cswpkgsyslog/trunk/files/01-CSWcswpkglogger-preupgrade 2009-10-23 13:14:58 UTC (rev 6954)
+++ csw/mgar/pkg/cswpkgsyslog/trunk/files/01-CSWcswpkglogger-preupgrade 2009-10-23 13:20:00 UTC (rev 6955)
@@ -1,11 +0,0 @@
-#!/opt/csw/bin/bash
-
-set -- ${1/-/ }
-
-PKG=$1
-VER=$2
-
-SYSTEMVER=$(pkgparam ${PKG} VERSION)
-
-# store previous version so we can log smarter things if upgrade fails.
-echo ${SYSTEMVER} > /var/opt/csw/pkg-hooks/CSWcswpkglogger.upgrade.${PKG}
Added: csw/mgar/pkg/cswpkgsyslog/trunk/files/01-CSWcswpkgsyslog-postupgrade
===================================================================
--- csw/mgar/pkg/cswpkgsyslog/trunk/files/01-CSWcswpkgsyslog-postupgrade (rev 0)
+++ csw/mgar/pkg/cswpkgsyslog/trunk/files/01-CSWcswpkgsyslog-postupgrade 2009-10-23 13:20:00 UTC (rev 6955)
@@ -0,0 +1,62 @@
+#!/opt/csw/bin/bash
+
+script=$0
+
+set -- ${1/-/ }
+PKG=$1
+VER=$2
+
+function logdie() {
+ logger -t "cswpkgsyslog" "$1"
+ exit 0
+}
+
+function success() {
+ case ${script} in
+ *install) MSG="installed ${PKG} ${VER}";;
+ *upgrade) MSG="upgraded ${PKG} to ${VER} (from: $1)";;
+ *remove) MSG="removed ${PKG} ${VER}";;
+ esac
+
+ logdie "${MSG}"
+}
+
+function failure() {
+ case ${script} in
+ *install) MSG="Failed to install ${PKG} ${VER}";;
+ *upgrade) MSG="Failed to upgrade ${PKG} ${VER} (current: $1)";;
+ *remove) MSG="Failed to remove ${PKG} ${VER}";;
+ esac
+
+ logdie "${MSG}"
+}
+
+if [ -d /var/sadm/pkg/${PKG} ]; then
+ SYSTEMVER=$(pkgparam ${PKG} VERSION 2>/dev/null)
+ pf=/var/opt/csw/pkg-hooks/CSWcswpkgsyslog.upgrade.${PKG}
+ if [ -f ${pf} ]; then
+ PREVVER=$(cat ${pf} 2>/dev/null)
+ rm -f ${pf}
+ fi
+
+ case ${script} in
+ *remove)
+ failure
+ ;;
+ *install|*upgrade)
+ case "${VER}" in
+ ${SYSTEMVER}) success ${PREVVER};;
+ *) failure ${SYSTEMVER};;
+ esac
+ ;;
+ esac
+else
+ case ${script} in
+ *remove)
+ success
+ ;;
+ *install|*upgrade)
+ failure
+ ;;
+ esac
+fi
Property changes on: csw/mgar/pkg/cswpkgsyslog/trunk/files/01-CSWcswpkgsyslog-postupgrade
___________________________________________________________________
Added: svn:executable
+ *
Added: csw/mgar/pkg/cswpkgsyslog/trunk/files/01-CSWcswpkgsyslog-preupgrade
===================================================================
--- csw/mgar/pkg/cswpkgsyslog/trunk/files/01-CSWcswpkgsyslog-preupgrade (rev 0)
+++ csw/mgar/pkg/cswpkgsyslog/trunk/files/01-CSWcswpkgsyslog-preupgrade 2009-10-23 13:20:00 UTC (rev 6955)
@@ -0,0 +1,11 @@
+#!/opt/csw/bin/bash
+
+set -- ${1/-/ }
+
+PKG=$1
+VER=$2
+
+SYSTEMVER=$(pkgparam ${PKG} VERSION)
+
+# store previous version so we can log smarter things if upgrade fails.
+echo ${SYSTEMVER} > /var/opt/csw/pkg-hooks/CSWcswpkgsyslog.upgrade.${PKG}
Property changes on: csw/mgar/pkg/cswpkgsyslog/trunk/files/01-CSWcswpkgsyslog-preupgrade
___________________________________________________________________
Added: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list