[csw-devel] SF.net SVN: gar:[12064] csw/mgar/pkg/exim/branches/dir-loc-fixes/files/ CSWexim.postinstall
bdwalton at users.sourceforge.net
bdwalton at users.sourceforge.net
Wed Dec 22 01:03:35 CET 2010
Revision: 12064
http://gar.svn.sourceforge.net/gar/?rev=12064&view=rev
Author: bdwalton
Date: 2010-12-22 00:03:34 +0000 (Wed, 22 Dec 2010)
Log Message:
-----------
exim/dir-loc-fixes: re-indent the postinstall script
Modified Paths:
--------------
csw/mgar/pkg/exim/branches/dir-loc-fixes/files/CSWexim.postinstall
Modified: csw/mgar/pkg/exim/branches/dir-loc-fixes/files/CSWexim.postinstall
===================================================================
--- csw/mgar/pkg/exim/branches/dir-loc-fixes/files/CSWexim.postinstall 2010-12-22 00:01:56 UTC (rev 12063)
+++ csw/mgar/pkg/exim/branches/dir-loc-fixes/files/CSWexim.postinstall 2010-12-22 00:03:34 UTC (rev 12064)
@@ -6,65 +6,65 @@
is_usr_readonly()
{
- mount | grep '^/usr ' | grep 'read only' >/dev/null
+ mount | grep '^/usr ' | grep 'read only' >/dev/null
}
is_usr_readonly
if [ $? -eq 0 -a "$SENDMAIL_ACTION" != "leave" ]; then
- echo "Your /usr partition is readonly. Cannot make modifications to it."
+ echo "Your /usr partition is readonly. Cannot make modifications to it."
else
### Now handle the sendmail files
# in Solaris 8 it's in /usr/bin; in Solaris 9 in /usr/sbin
- if [ -r "$PKG_INSTALL_ROOT/usr/bin/newaliases" ]; then
- NEWALIASES="$PKG_INSTALL_ROOT/usr/bin/newaliases"
- elif [ -r "$PKG_INSTALL_ROOT/usr/sbin/newaliases" ]; then
- NEWALIASES="$PKG_INSTALL_ROOT/usr/sbin/newaliases"
- else
+ if [ -r "$PKG_INSTALL_ROOT/usr/bin/newaliases" ]; then
+ NEWALIASES="$PKG_INSTALL_ROOT/usr/bin/newaliases"
+ elif [ -r "$PKG_INSTALL_ROOT/usr/sbin/newaliases" ]; then
+ NEWALIASES="$PKG_INSTALL_ROOT/usr/sbin/newaliases"
+ else
# use this as default (the remove script will find it in bin and sbin)
- NEWALIASES="$PKG_INSTALL_ROOT/usr/sbin/newaliases"
- fi
+ NEWALIASES="$PKG_INSTALL_ROOT/usr/sbin/newaliases"
+ fi
- echo "Checking for newaliases... $NEWALIASES"
+ echo "Checking for newaliases... $NEWALIASES"
- if [ "$SENDMAIL_ACTION" = "replace" ]; then
+ if [ "$SENDMAIL_ACTION" = "replace" ]; then
# Make backup of sendmail files
- if [ ! -r "$NEWALIASES.OFF" ] && [ -r "$NEWALIASES" ]; then
- echo "Moving $NEWALIASES to newaliases.OFF"
- mv "$NEWALIASES" "$NEWALIASES.OFF"
+ if [ ! -r "$NEWALIASES.OFF" ] && [ -r "$NEWALIASES" ]; then
+ echo "Moving $NEWALIASES to newaliases.OFF"
+ mv "$NEWALIASES" "$NEWALIASES.OFF"
+ fi
+ if [ ! -f "$PKG_INSTALL_ROOT/usr/lib/sendmail.OFF" ] && [ -f "$PKG_INSTALL_ROOT/usr/lib/sendmail" ]; then
+ echo "Moving $PKG_INSTALL_ROOT/usr/lib/sendmail to sendmail.OFF"
+ mv "$PKG_INSTALL_ROOT/usr/lib/sendmail" "$PKG_INSTALL_ROOT/usr/lib/sendmail.OFF"
+ fi
+ if [ ! -f "$PKG_INSTALL_ROOT/usr/bin/mailq.OFF" ] && [ -f "$PKG_INSTALL_ROOT/usr/bin/mailq" ]; then
+ echo "Moving $PKG_INSTALL_ROOT/usr/bin/mailq to mailq.OFF"
+ mv "$PKG_INSTALL_ROOT/usr/bin/mailq" "$PKG_INSTALL_ROOT/usr/bin/mailq.OFF"
+ fi
+ else
+ if [ "$SENDMAIL_ACTION" = "overwrite" ]; then
+ echo "Removing $PKG_INSTALL_ROOT/usr/lib/sendmail"
+ rm -f "$PKG_INSTALL_ROOT/usr/lib/sendmail"
+ echo "Removing $NEWALIASES"
+ rm -f "$NEWALIASES"
+ echo "Removing $PKG_INSTALL_ROOT/usr/bin/mailq"
+ rm -f "$PKG_INSTALL_ROOT/usr/bin/mailq"
+ fi
fi
- if [ ! -f "$PKG_INSTALL_ROOT/usr/lib/sendmail.OFF" ] && [ -f "$PKG_INSTALL_ROOT/usr/lib/sendmail" ]; then
- echo "Moving $PKG_INSTALL_ROOT/usr/lib/sendmail to sendmail.OFF"
- mv "$PKG_INSTALL_ROOT/usr/lib/sendmail" "$PKG_INSTALL_ROOT/usr/lib/sendmail.OFF"
+
+ if [ "$SENDMAIL_ACTION" = "leave" ]; then
+ echo "Not making symbolic links to to $PKG_INSTALL_ROOT/opt/csw/sbin/exim."
+ echo "Read exim documentation for more information."
+ else
+ ln -s "$PKG_INSTALL_ROOT/opt/csw/sbin/exim" "$PKG_INSTALL_ROOT/usr/lib/sendmail"
+ ln -s "$PKG_INSTALL_ROOT/opt/csw/sbin/exim" "$PKG_INSTALL_ROOT/usr/bin/mailq"
+ echo "#!/bin/sh" >"$NEWALIASES"
+ echo "# This script is part of the Exim MTA" >>"$NEWALIASES"
+ echo "/usr/lib/sendmail -bi" >>"$NEWALIASES"
+ chgrp bin "$NEWALIASES"
+ chmod 755 "$NEWALIASES"
fi
- if [ ! -f "$PKG_INSTALL_ROOT/usr/bin/mailq.OFF" ] && [ -f "$PKG_INSTALL_ROOT/usr/bin/mailq" ]; then
- echo "Moving $PKG_INSTALL_ROOT/usr/bin/mailq to mailq.OFF"
- mv "$PKG_INSTALL_ROOT/usr/bin/mailq" "$PKG_INSTALL_ROOT/usr/bin/mailq.OFF"
- fi
- else
- if [ "$SENDMAIL_ACTION" = "overwrite" ]; then
- echo "Removing $PKG_INSTALL_ROOT/usr/lib/sendmail"
- rm -f "$PKG_INSTALL_ROOT/usr/lib/sendmail"
- echo "Removing $NEWALIASES"
- rm -f "$NEWALIASES"
- echo "Removing $PKG_INSTALL_ROOT/usr/bin/mailq"
- rm -f "$PKG_INSTALL_ROOT/usr/bin/mailq"
- fi
- fi
-
- if [ "$SENDMAIL_ACTION" = "leave" ]; then
- echo "Not making symbolic links to to $PKG_INSTALL_ROOT/opt/csw/sbin/exim."
- echo "Read exim documentation for more information."
- else
- ln -s "$PKG_INSTALL_ROOT/opt/csw/sbin/exim" "$PKG_INSTALL_ROOT/usr/lib/sendmail"
- ln -s "$PKG_INSTALL_ROOT/opt/csw/sbin/exim" "$PKG_INSTALL_ROOT/usr/bin/mailq"
- echo "#!/bin/sh" >"$NEWALIASES"
- echo "# This script is part of the Exim MTA" >>"$NEWALIASES"
- echo "/usr/lib/sendmail -bi" >>"$NEWALIASES"
- chgrp bin "$NEWALIASES"
- chmod 755 "$NEWALIASES"
- fi
fi
cat <<EOF
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