Revision: 4678 http://gar.svn.sourceforge.net/gar/?rev=4678&view=rev Author: valholla Date: 2009-05-05 00:34:52 +0000 (Tue, 05 May 2009)
Log Message: ----------- postinstall tweak Modified Paths: -------------- csw/mgar/pkg/squid/trunk/checksums csw/mgar/pkg/squid/trunk/files/CSWsquid.postinstall csw/mgar/pkg/squid/trunk/files/CSWsquid.preremove Modified: csw/mgar/pkg/squid/trunk/checksums =================================================================== --- csw/mgar/pkg/squid/trunk/checksums 2009-05-04 22:30:52 UTC (rev 4677) +++ csw/mgar/pkg/squid/trunk/checksums 2009-05-05 00:34:52 UTC (rev 4678) @@ -1,3 +1,3 @@ -c382084075531222e45669fd8224088e download/CSWsquid.postinstall -60ca435ff29ff327a3f093949cdab958 download/CSWsquid.preremove +121a5d15dc17f580ace367e8bef2ccd7 download/CSWsquid.postinstall +f97bf395c3d2d73a876f9091707126bc download/CSWsquid.preremove ad73bb6b95a42b93cfc62cf5762251a1 download/cswsquid Modified: csw/mgar/pkg/squid/trunk/files/CSWsquid.postinstall =================================================================== --- csw/mgar/pkg/squid/trunk/files/CSWsquid.postinstall 2009-05-04 22:30:52 UTC (rev 4677) +++ csw/mgar/pkg/squid/trunk/files/CSWsquid.postinstall 2009-05-05 00:34:52 UTC (rev 4678) @@ -3,24 +3,42 @@ # Squid-cache preremove script PATH=/usr/bin:/usr/sbin -export PATH +umask 0022 + CSW_PREFIX=${PKG_INSTALL_ROOT}/opt/csw SQUID_CONFDIR=${CSW_PREFIX}/etc SQUID_VARDIR=${CSW_PREFIX}/var SQUID_SBINDIR=${CSW_PREFIX}/sbin +USER='' +GRP='' - if [ -f ${SQUID_CONFDIR}/squid.conf ]; then echo 'squid.conf found, Preserving Existing Config!' + USER="`awk '$1 ~ /cache_effective_user/ {print $2}' \ + ${SQUID_CONFDIR}/squid.conf`" + GRP="`awk '$1 ~ /cache_effective_group/ {print $2}' \ + ${SQUID_CONFDIR}/squid.conf`" else cp ${SQUID_CONFDIR}/squid.conf.CSW ${SQUID_CONFDIR}/squid.conf chmod 0644 ${SQUID_CONFDIR}/squid.conf fi -if [ -d ${SQUID_VARDIR}/cache ]; then - chown nobody:nobody ${SQUID_VARDIR}/cache +touch ${SQUID_VARDIR}/logs/access.log +touch ${SQUID_VARDIR}/logs/cache.log +touch ${SQUID_VARDIR}/logs/store.log + +if [ "_x${USER}x_" = "_xx_" ]; then + USER=nobody fi +if [ "_x${GRP}x_" = "_xx_" ]; then + GRP=nobody +fi +chown ${USER}:${GRP} ${SQUID_VARDIR}/logs/access.log +chown ${USER}:${GRP} ${SQUID_VARDIR}/logs/cache.log +chown ${USER}:${GRP} ${SQUID_VARDIR}/logs/store.log +chown ${USER}:${GRP} ${SQUID_VARDIR}/cache + ${SQUID_SBINDIR}/squid -z exit 0 Modified: csw/mgar/pkg/squid/trunk/files/CSWsquid.preremove =================================================================== --- csw/mgar/pkg/squid/trunk/files/CSWsquid.preremove 2009-05-04 22:30:52 UTC (rev 4677) +++ csw/mgar/pkg/squid/trunk/files/CSWsquid.preremove 2009-05-05 00:34:52 UTC (rev 4678) @@ -13,8 +13,8 @@ svccfg delete svc:application/server/cswsquid:default else echo 'Stopping squid server' - if [ -x ${PKG_INSTALL_ROOT}/etc/init.d/cswsquid ]; then - ${PKG_INSTALL_ROOT}/etc/init.d/cswsquid stop + if [ -x ${PKG_INSTALL_ROOT}/etc/opt/csw/init.d/cswsquid ]; then + ${PKG_INSTALL_ROOT}/etc/opt/csw/init.d/cswsquid stop else pkill -9 squid fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ devel mailing list devel@lists.opencsw.org https://lists.opencsw.org/mailman/listinfo/devel