[csw-devel] SF.net SVN: gar:[4325] csw/mgar/pkg/sudo

valholla at users.sourceforge.net valholla at users.sourceforge.net
Wed Apr 15 17:06:56 CEST 2009


Revision: 4325
          http://gar.svn.sourceforge.net/gar/?rev=4325&view=rev
Author:   valholla
Date:     2009-04-15 15:06:56 +0000 (Wed, 15 Apr 2009)

Log Message:
-----------
fix conflicting files for sudo packages

Modified Paths:
--------------
    csw/mgar/pkg/sudo/trunk/Makefile
    csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove

Added Paths:
-----------
    csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall
    csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove

Modified: csw/mgar/pkg/sudo/trunk/Makefile
===================================================================
--- csw/mgar/pkg/sudo/trunk/Makefile	2009-04-15 14:47:46 UTC (rev 4324)
+++ csw/mgar/pkg/sudo/trunk/Makefile	2009-04-15 15:06:56 UTC (rev 4325)
@@ -32,6 +32,8 @@
 REQUIRED_PKGS_CSWsudo-common = CSWggettextrt
 
 DISTFILES += CSWsudo-common.postinstall 
+DISTFILES += CSWsudo.postinstall
+DISTFILES += CSWsudo.postremove
 
 CONFIGURE_ARGS  = $(DIRPATHS)
 CONFIGURE_ARGS += --with-pam
@@ -44,17 +46,9 @@
 
 include gar/category.mk
 
-PKGFILES_CSWsudo = .*/bin/.*
+PKGFILES_CSWsudo = .*/bin/sudo.minimal
 
-post-install-modulated:
-	@( cd $(DESTDIR)$(sysconfdir) ; mv sudoers sudoers.CSW )
-	@( cd $(DESTDIR)$(bindir) ; rm -f sudoedit )
-	@( cd $(DESTDIR)$(bindir) ; mv sudo sudo.minimal )
-	@( cd $(DESTDIR)$(bindir) ; ln -f sudo.minimal sudo )
-	@( cd $(DESTDIR)$(bindir) ; ln -f sudo.minimal sudoedit )
-	@$(MAKECOOKIE)
-	$(DONADA)
-
 post-merge-modulated:
+	@( cd $(PKGROOT)$(bindir) ; mv sudo sudo.minimal )
 	@( cd $(PKGROOT)$(bindir) ; gchmod 4755 sudo* )
 	@$(MAKECOOKIE)

Added: csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall
===================================================================
--- csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall	                        (rev 0)
+++ csw/mgar/pkg/sudo/trunk/files/CSWsudo.postinstall	2009-04-15 15:06:56 UTC (rev 4325)
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+BINDIR=$BASEDIR/opt/csw/bin
+
+## First check to see if sudo.ldap is installed
+## If it is make sure the liks are in place
+## and permissions are set accordingly
+if [ -f ${BINDIR}/sudo.ldap ]; then
+    chmod 4755 ${BINDIR}/sudo.ldap
+    if [ ! -f ${BINDIR}/sudo ]; then
+        ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudo
+    fi
+    if [ ! -f ${BINDIR}/sudoedit ]; then
+        ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudoedit
+    fi
+else
+    rm -f ${BINDIR}/sudo
+    rm -f ${BINDIR}/sudoedit
+    ln -f ${BINDIR}/sudo.minimal ${BINDIR}/sudo
+    ln -f ${BINDIR}/sudo.minimal ${BINDIR}/sudoedit
+fi
+
+exit 0
+

Added: csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove
===================================================================
--- csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove	                        (rev 0)
+++ csw/mgar/pkg/sudo/trunk/files/CSWsudo.postremove	2009-04-15 15:06:56 UTC (rev 4325)
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+BINDIR=$BASEDIR/opt/csw/bin
+
+if [ -f ${BINDIR}/sudo.ldap ]; then
+    chmod 4755 ${BINDIR}/sudo.ldap
+    rm -f ${BINDIR}/sudo 
+    rm -f ${BINDIR}/sudoedit
+    ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudo
+    ln -f ${BINDIR}/sudo.ldap ${BINDIR}/sudoedit
+fi
+
+exit 0
+

Modified: csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove
===================================================================
--- csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove	2009-04-15 14:47:46 UTC (rev 4324)
+++ csw/mgar/pkg/sudo_ldap/trunk/files/CSWsudoldap.postremove	2009-04-15 15:06:56 UTC (rev 4325)
@@ -1,12 +1,12 @@
 #!/bin/sh
 
 BINDIR=$BASEDIR/opt/csw/bin
-SUDO_MINIMAL=${BINDIR}/sudo.minimal
 
-if [ -f ${SUDO_MINIMAL} ]; then
-    rm -f sudo sudoedit
-    ln -f $SUDO_MINIMAL ${BINDIR}/sudo
-    ln -f $SUDO_MINIMAL ${BINDIR}/sudoedit
+if [ -f ${BINDIR}/sudo.minimal ]; then
+    rm -f ${BINDIR}/sudo 
+    rm -f ${BINDIR}/sudoedit
+    ln -f ${BINDIR}/sudo.minimal ${BINDIR}/sudo
+    ln -f ${BINDIR}/sudo.minimal ${BINDIR}/sudoedit
 fi
 
 exit 0


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